How to keep FastCGI processes alive
October 30th, 2005
I have the following CRON entries for one of my sites:
1 2 3 |
39 * * * * killall -9 dispatch.fcgi >/dev/null 2>&1 0,4,8,12,16,20,24,28,32,36,40,44,48,52,56 * * * * \ curl http://www.weputlightsup.com/ >/dev/null 2>&1 |
What does this do ? The first entry kills all of my FastCGI processes at 39 minutes past the hour. The second one pings a specific URL to ensure the FastCGI processes are always up and running, every four minutes.
I am certainly not the first to mention this technique, see View processes, grep out by user and then kill all their PIDs.
Seems strange though that I couldn’t find much references to this technique while Googling around.
Anyway, I hope this helps someone.
Leave a Reply