The more I learn, the less I know.
Posts tagged web hosting
Kickstarting mongrel with 503 errors.
Mar 24th
So, I’m a total sucker for punishment, and thus I run a very small rails (mongrel) app on my website (shared host). Every once in a while, the mongrel app dies for some reason (server was rebooted, power loss, etc), and the PID file isn’t removed. So I tried an experiment. I told apache to use a PHP file for 503 errors (Service Unavailable — or what my users see when apache tries to rewrite to a mongrel that isn’t there). Then I wrote setup the PHP file to try and start rails, and email me if it fails. Read below for all of the PHP code and shell files used. More >