tonight i was working on our master server. I took it offline for a little bit and noticed something odd of all the slaves. If a slave cannot connect to a master it crashes. The slaves are trying to constantly connect to the master with Code: DBI connect('database=dbispconfig;host=lb1a.xxxxxx.com:3306','ispcsrv5',...) fai$ DBI Error: at /usr/local/ispconfig/server/scripts/vlogger line 255. this happens every second it seems. when this does all apache2 servers crash with a max open failure and then an internal 500 error. of course once the master is online and you restart apache on the slaves all is well. any thoughts on this? am i over looking something that would stop the slaves from causing the 500 error? as it looks it does not allow you to mirror and then provide fail over as the slave is always looking for the master. if the master does in fact come offline for maintenance all slaves then crash
Looks as if the vlogger application does not handle DB errors correctly. What is the exact error message of this 500 error in the mail log?
Please try to replace the script /usr/local/ispconfig/server/scripts/vlogger on your server with the vlogger script in the attached zip file and restart apache. The modified script adds a try / catch block around the datababase connection functions to handle database connection errors without causeing the script and apache to fail.
here is the full line i napache2's error.log Code: DBI connect('database=dbispconfig;host=lb1a.xxx.com:3306','ispcsrv5',...) failed: Can't connect to MySQL server on 'lb1a.xxx.com' (113) at /usr/local/ispconfig/server/scripts/vlogger line 255 DBI Error: at /usr/local/ispconfig/server/scripts/vlogger line 255. piped log program ' /usr/local/ispconfig/server/scripts/vlogger -s access.log -t "%Y%m%d-access.log" -d "/etc/vlogger-dbi.conf" /var/log/ispconfig/httpd' failed unexpectedly after about 3 minutes of that this is then registered in the sites error log and the sites all go to a 500 internal error. Code: 24)Too many open files: /var/www/clients/client1/web1/web/error/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable I will try the vlogger you have attached once it becomes later as this is a busy site to take down.