PDA

View Full Version : Can Apache be told to replace the forums with a spash screen during backups?


kippesp
Thu 13th Mar '03, 9:23pm
My forums are backed up with the backup script available on these forums. But now the data has grown so large, we get timeouts and sometimes failed backups because MySQL loses its connection.

Of course this is all automated. But what I'd really like to do is turn off the forums while the backup script is running. Does anyone have any suggestions that are effective in doing this? We're running Apache.

I don't want to hack the vB code to look for a special lock file. That would cause a file check on each server request--wasteful.

Switching to an alternative httpd.conf file is an option (requiring us to maintain two files). But I was hoping that someone knew of a signal to give Apache that could be incorporated into our existing httpd.conf file.

Thanks.

[edit] Never mind....must have had a mental block about making an .htaccess file for a short bit.

KrON
Fri 14th Mar '03, 7:53pm
If your site is losing its SQL connection during backups, you've got some serious problems going on there. I'd ask eva2000 to look at your mysql.cf and give his opinion, cuz it sounds like somethings going on there..

eva2000
Sun 16th Mar '03, 6:54am
what backup script you're using ?

windows or linux server ?

to start, please provide the following

1. is this on dedicated or shared virual server
2. your server specs, such as mysql and php version
3. if possible how mysql was compiled/installed
4. your top stats
5. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if you don't have that file you need to log into telnet and as root user type

mysqladmin -u root -p variables

copy and paste output here

6. your mysql extended-status output either still telnet as root user type

mysqladmin -u root -p extended-status

copy and paste output here

or preferred is to installed extended-status output script which is either located

- in your vB 2.2.6 or higher vB version's zip file extra's folder, upload mysqlinfo.php script to your site or if you're on an pre vB 2.2.6 install go to
- http://vbulletin.com/forum/showthread.php?threadid=3477 and install that scrip making sure to edit $mysqllogin line with your own mysqlusername and password

and post url to that here

7. oh and is your vB the only thing on the server? or other scripts? sites?

8. how many average and max concurrent users on your vB forum ?

9. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site

<?
phpinfo();
?>

i.e. yourdomain.com/phpinfo.php

10. if you run Apache and you have your own dedicated server or access to your httpd.conf (apache configuration file) can you post the values you have set for the following :

KeepAlive
MaxKeepAliveRequests
KeepAliveTimeout
MinSpareServers
MaxSpareServers
StartServers
MaxClients

11. what version of vB are you running ?

kippesp
Wed 19th Mar '03, 3:42pm
Our server's been configured for 16-bit I/O all this time. It's been switched now to 32-bit with DMA. If tonight's backup goes well, we may not need to shut off the forums. So all that work for not.

If not, I may be back for help on our my.cnf file....

Floris
Wed 19th Mar '03, 4:02pm
Making a backup of a .sql it is always smart to turn off the forums. It prevents those kind of problems.

feldon23
Thu 20th Mar '03, 6:26pm
Making a backup of a .sql it is always smart to turn off the forums. It prevents those kind of problems.
Replace index.php, showthread.php, and forumdisplay.php with something cool, then, 10 min later, close the forum.

kippesp
Fri 21st Mar '03, 2:48am
Changing the drives to use 32-bit I/O & DMA had an amazing improvement in backup time. Went from 13 minutes of high-load-hell to 2 minutes of hardly a blip. But I'm still keeping the forums off for those 2 or so minutes.

I actually scripted something to change a custom template we added to the forum header. So our users are warned with a banner across all pages when we're about to go down. We have 4 forums, so adding banners by hand was going by the way side.

eva2000, you may want to ask users on dedicated machines about hdparm settings in your general my.cnf run-down. It's like our server was given a second life. We assumed our server provider took care of all configurations, but that didn't happen here.