Forum Moderators: phranque

Message Too Old, No Replies

How to handle db driven page when restarting db server?

         

brandon0401

7:21 am on Sep 19, 2007 (gmt 0)

10+ Year Member



Lets say you need to restart to clean some things out or tweak, what is the best way to handle your db driven pages header, and anything else wise?

Check if db gets read, if not ...

Want to make sure all my pages and links get indexed fine, cause it appears im seeing a tad bit of broken links in small time db server would be down...want to prevent pages in index from getting goofed

Thanks!

Demaestro

5:54 pm on Sep 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you have a lot of things relying on the DB then I would just put up an "Upgrading database" page that tells users how long you are down for and why you are down... AKA "to service them better"

Do an Apache or HTaccess rewrite that will send all hits to your site to the upgrading info page.... do your stuff.. then test... the put everything back.

LifeinAsia

6:01 pm on Sep 19, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It depends on how long the "small time db server would be down" will be. If it's just going to be a few minutes, I wouldn't worry about it. If it's going to be an extended period of time, it might be better to have a backup DB server running while the main one is being updated. It all depends on what you're actually doing with the DB.

plumsauce

8:02 pm on Sep 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




If you are concerned about any pages being indexed incorrectly, you can consider two things:

stop the web server first.

or, remember that the web server will return 500 server error.

either will cause a spider to come back later to get the real page.

mack

3:45 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I agree with the previous suggestion if showing a "We are upgrading" page with an idea of time scale.

What I would also do is make sure you do the work when your site traffic is at it's lowest. This may be 4am on a Monday morning for example. Check your logs or stat analyser for this information.

Mack.

jtara

3:44 pm on Sep 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Replace the page with an "updating database" page, and also modify your robots.txt file to exclude the page from indexing.