Take the 2-minute tour ×  I've found a faulty connection to my
database caused my development WAMP server to crash, even though
the software is in working order, but PHP crashed and took the
server down. Is there any way to make WAMP server or Apache
itself automatically restart on crash?  Is there any reason I
wouldn't want to do this? It's an issue I've had a couple times
and I figure even if it crashes and restarts it's better than
not being up at all, but I may not be seeing the big picture.
share|improve this question add comment  1 Answer  up vote 1
down vote accepted  You can write a watchdog that tries to
access a page on your web server and if it fails restarts the
server. Run it as a scheduled task every {minute, 5 minutes,
half hour, whatever...}. Implementation of this script is left
as an exercise for the reader (especially on Windows, but
PowerShell is probably going to be your friend).  You are
however missing the Big Picture as you suspect - A failed
database connection should cause your site