Hi there, I have run into 500 error when I create private message, the message did get sent but it didn't save in sent items folder, and this only happen to one of my forum which has 250k users. I did some investigating, I think I found the issue, but don't know how to fix it.
In core/vb/library/content/privatemessage.php, line 555.
This select all user's folder that is "trash" and "message", in my case I have around 1.5 million record in messagefolder table, and script just die here try to select all those folder, I assume it should return around 375k result, since each user has 8 folder and select two folder from it. However this query took too long and it just give me 500 error instead
In core/vb/library/content/privatemessage.php, line 555.
PHP Code:
$includeFoldersQry = $this->assertor->getRows('vBForum:messagefolder', array(
vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT,
'titlephrase'=> array(self::TRASH_FOLDER, self::MESSAGE_FOLDER),
vB_dB_Query::COLUMNS_KEY => array('folderid')
)
);
$includeFolders = array(-1); // -1 so that array is not empty. Other wise IN clause breaks
foreach($includeFoldersQry AS $includeFolder)
{
$includeFolders[] = $includeFolder['folderid'];
}
Comment