Bob, I don't require a full server reboot. I just reboot the Apache server. The watchdog is very simple but it requires an component running on a different server. I will detail how I build it because it is dead silly.
On the CentOS installation, I have a file called yes.txt whose content is "YES". On my on-rev server, I have a Livecode script that tries to load that yes.txt from my CentOS VPS. If it can read "YES" then it will return true, if not, it will return false. Back on the CentOS server, I have a cronjob running every five minutes. This cronjob will load the script on the on-rev server and check to see if the result is true or false. True means that the on-rev server is able to load a page thru apache from the CentOS server, false usually means that Apache is dead and no one noticed. If it receives true, nothing happens but if it receives false, it runs an Apache reboot script that has the following lines: pkill -9 httpd /etc/init.d/httpd start The first line kills all Apache processes, the second restart it. It also sends an email to my account telling me what happened. =) On Wed, Feb 8, 2012 at 2:39 PM, Bob Sneidar <[email protected]> wrote: > Hmmm... We use CentOS for a digital key system and we have the same problem. > Randomly Apache will fail and we usually just restart the whole server to fix > it. I would be interested in your watchdog app! You wouldn't mind sending > that to me would you? > > Bob > > > On Feb 7, 2012, at 7:20 PM, Andre Garzia wrote: > >> I don't like CentOS. I never did. I >> think YUM is a bad manager and I don't like RPM based systems. But my >> served worked fine up until some weeks ago when it started crashing >> randomly. Every ten or so days, Apache would die. No log written. I >> tried everything and I am yet to find what is causing the crash. The >> correction is easy, I just need to reboot apache, so I built myself a >> little watchdog that checks to see if Apache is actually serving my >> page, if it stops, then my watchdog reboots it, the process takes less >> than a minute. > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- http://www.andregarzia.com -- All We Do Is Code. http://fon.nu -- minimalist url shortening service. _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
