You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jason Clary <jc...@futurefx.com> on 1997/03/10 06:25:50 UTC

httpd exit codes


Would it be too much to ask to have the server attempt to read
its config and bind all ports prior to forking into the background
so that it can properly report startup errors?

Maybe this has been done for 1.2x, I'm not sure since I haven't
had a lot of time to fiddle with it in detail yet..  But with
1.1.3 I use a script that restarts the server every 24 hours
by sending an -INT, waiting a bit then sending a -KILL then waiting
a bit and restarting...  Unfortunately, it always reports
true when restarting even if its already running and can't
bind ports because of that.

I don't know about config errors, maybe those are taken
care of prior to the fork, I haven't dug around it much since
it isn't particularly relavent..

To this end, I currently have a cron running every 2 minutes checking
for an active httpd (httpd.pid and checking /proc/<pid> info) and
restarting if necessary.  I also run another similar script that
hits the server via http on all virtuals just to make sure everything
is functioning...I wouldn't need to run the first so often if I weren't
worried about proper startup after the resets.

if you are wondering why I reset... I reset everything regularly.. i'm
rather well known for having my servers averaging 60 days of uptime
before reboot and being highly reliable under extream loads.

---
Jason Clary <jc...@futurefx.com>
http://www.futurefx.com/~jclary/
---