View Full Version : DB Slave Search Server
TechGuy
06-02-2008, 02:37 PM
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!
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
06-02-2008, 02:49 PM
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
06-02-2008, 03:26 PM
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
06-02-2008, 03:28 PM
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
06-03-2008, 04:15 AM
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
06-03-2008, 10:19 AM
Even without the conditional statement I am still receiving the blank page when a search is submitted.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.