PDA

View Full Version : DB Slave Search Server


TechGuy
02 Jun 2008, 16:37
I am attempting to use a MySQL slave server for search only. I have followed the advice in other threads in the forums and have modified my config.php as:

$config['Database']['dbtype'] = 'mysql_slave';
if (THIS_SCRIPT == search)
{
$config['SlaveServer']['servername'] = '192.168.0.4';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = '****';
$config['SlaveServer']['password'] = '*****';
$config['SlaveServer']['usepconnect'] = 0;

}

With these changes Vbulletin returns a blank white page. I modified the php.ini to turn all error logging on, however, I continue to receive no errors on screen nor in apache's error.log.

Any advice would be appreciated!

royo
02 Jun 2008, 16:40
Even though it's a local server address, you may want to remove the password, for security reasons. Sorry for being offtopic, and not being able to help you out though :/.

snakes1100
02 Jun 2008, 16:49
Did you try and enable debug in apache and see if it spit out any more info?

Do you have error logging on in mysql?

Marco van Herwaarden
02 Jun 2008, 17:26
Why are you enclosing this in an if-statement?

What you are doing now is to tell vBulletin to always use the slave server (vBulletin will only use the slave for queries that are not critical), but on any other page then the search page no MySQL server information is provided for the slave server.

TechGuy
02 Jun 2008, 17:28
Thanks royo. I was in such a hurry when I did that I completely forgot.

I have debug on for apache and there is nothing relating to search.php at all. Same goes for the MySQL error log.

--------------- Added 1212426293 at 1212426293 ---------------

Marco,

I was under the impression if I removed the conditional statement that VB would use the slave db for ALL reads. I only want VB to use the slave db when searching. Did I misunderstand?

--------------- Added 1212457172 at 1212457172 ---------------

Going through line by line I've been able to locate the two lines that are throwing the page off. I have no idea why these two lines are throwing the page off however, they are:
2237 eval(standard_error(fetch_error('searchnoresults', $displayCommon), '', false));
3736 eval('print_output("' . fetch_template($templatename) . '");');

Dismounted
03 Jun 2008, 06:15
I was under the impression if I removed the conditional statement that VB would use the slave db for ALL reads. I only want VB to use the slave db when searching. Did I misunderstand?
As Marco has said, vBulletin only uses the slave for non-critical reads, so you might as well enable for all pages.

TechGuy
03 Jun 2008, 12:19
Even without the conditional statement I am still receiving the blank page when a search is submitted.