Skeptical
05-19-2002, 10:48 PM
What is the best way to restart services that die suddenly? I have cpanel and would like to find out how they do it. Thanks.
![]() | View Full Version : Automatically restart services Skeptical 05-19-2002, 10:48 PM What is the best way to restart services that die suddenly? I have cpanel and would like to find out how they do it. Thanks. Sainthax 05-19-2002, 11:34 PM I have webmin installed on a few servers and it has a option to check services at a set time and it can issue any command you tell it to if a service doesn't respond. It's kinda neat I can stop apache and when it checks the services it will send the start command and apache will start back up. cperciva 05-20-2002, 12:11 AM Try djb's daemontools, specifically `supervise`. jic 05-20-2002, 12:32 AM supervise is great.. but I think if processes are just "dying" you need to probably look into why. cperciva 05-20-2002, 12:40 AM Originally posted by jic supervise is great.. but I think if processes are just "dying" you need to probably look into why. I think that goes without saying. Skeptical 05-20-2002, 04:53 AM Originally posted by jic supervise is great.. but I think if processes are just "dying" you need to probably look into why. Yes that is what I tried doing, and looking at the /var/log/messages all I see is: May 16 08:01:08 server kernel: Out of Memory: Killed process 614 (mysqld). Now what can cause this? Is there a way I can find out what exactly is causing the out of memory event? Such as a rash of mysql queries all coming in at once, or stuff like that? This particular server isn't very busy at all and has 380+ mb of RAM. xerocity.com 05-20-2002, 06:40 AM Personally, I'd up the memory to 1GB if your server can handle that amount. Do you have any cron jobs that run on thursdays at 8 a.m.? I have seen these kind of things happen when a cron job is taking up alot of resources. If you don't have any cron jobs that were running, try to check your users logs maybe a user on the server did just get a "rash of mysql queries all coming in at once". I have seen wierder. Skeptical 05-20-2002, 09:32 AM Originally posted by xerocity.com Personally, I'd up the memory to 1GB if your server can handle that amount. Do you have any cron jobs that run on thursdays at 8 a.m.? I have seen these kind of things happen when a cron job is taking up alot of resources. If you don't have any cron jobs that were running, try to check your users logs maybe a user on the server did just get a "rash of mysql queries all coming in at once". I have seen wierder. Yeah I think I should add more RAM. But just in case the problem lies elsewhere I'd like to find out about it. As for cron jobs, I don't see any running at that time. And this server is used only by me to run httpd and mysql for my website, so it couldn't have been caused by some user running a bad script or something. jahsh 05-21-2002, 03:42 PM definitely add more RAM, should alleviate most of your problems if not all of them. |