Hi all, I wonder whether I should let a script check (say every 5 minutes or so) whether apache is still running. If it's not, the script would automatically restart. How do you do it? Is this a good practice?
as per my knowledge restarting apache after every 5 mins. is not good practise. It can affect your sessions on the web sites. I am not sure...so better to wait for reply from some expert
I keep a cron set on my busiest network servers to restart Apache every hour, just in case. I do find Apache can just quit at times with a high load.
It is better to do a chron setup, that checks if apache is down, start it up. You can set the frequency something between 15 mins to 30 mins.
Sure you can do that, but if the apache daemon dies right after the check then it could be down for 15 to 30 minutes.