PDA

View Full Version : Vbulleting forums + Cpanel backups = Havoc


Jujimufu
02-26-2010, 03:22 PM
The server my forum is fine during normal hours, but when cpanel does its backup and/or scheduled updates the whole server freaks out because the forums won't give the cpu a break. :(

It's a vicious cycle where the cpu load spikes and then the server feels the need to dispatch an email every second indicating which process has a high load, and since the forums always have about 15 or more running processes it sends about 15 emails a minute, which creates even higher cpu load...blah blah.

Long story short the server will just freeze. I can't login via SSH to kill the processes or anything when the load is so high (it times out) and I have to submit a reboot ticket to my hosting company because with the load so high it'll take 2 hours for cpanel to do its backup.

Does anybody know of a script I could run that would halt httpd while cpanel does its backups/updates and just display a message to users saying "Performing scheduled backups, hang tight" or something simple - no db queries or anything. That would probably work like a charm?

Or any other solution to this problem? I'm running VB 3.8.4.

Marco van Herwaarden
02-27-2010, 09:59 AM
I would start by posting an optimization request on the vBulletin.com server configuration forum.

Paul M
02-27-2010, 11:09 AM
If you halt httpd then there wont be anything running to give your users a message.

snakes1100
02-27-2010, 11:26 AM
I would agree with Marco, you should look at what is actually causing the server to suck up all your resources during the backup time, log into the server via ssh before the cron starts and try to find out what pid (s) are doing the damage.

You could temporarily use this as well to do what you asked. You will need to place this in a file and set a cron to run it 15 seconds before the db dump starts, you will also have to make a dupe conf file so as Paul points out, your visitors get a message as to whats going on. Set the new conf file to point at default index.html for all calls to apache on the server.

Simple & crude, should work for your needs.


#!/bin/sh
/usr/local/apache/bin/apachectl stop
sleep 30
/usr/local/apache/bin/apachectl -f /usr/local/new.conf start
sleep 128000
/usr/local/apache/bin/apachect stop
sleep 30
/usr/local/apache/bin/apachectl start

final kaoss
03-01-2010, 06:59 PM
I use mysql dumper (http://mysqldumper.net) instead of cpanel for backups & restores. It's alot more secure and efficient.