Status
Not open for further replies.

casey

Well-Known Member
Jan 17, 2003
2,303
0
191
I'm not familiar with cron jobs, so would anybody be so kind as to tell me how to make a cron job to restart httpd every 10 minutes? WHM never notices when it dies, so it just stays dead until I restart it manually. I went away this weekend and the bugger stopped for two days. It would be a disaster if this happened after I open the server to clients--even though I don't plan on leaving it unmonitored that long once I do.

How does everyone else handle this problem?
 

hostcp3

Well-Known Member
Jun 18, 2002
156
0
166
Sent you a PM

but basically something like this works

Command

lynx -cookies -dump -auth=root:your_root_password_here http://your_main_server_ip_here:2086/scripts/reshttpd


all the above on one line in your Control panel cron manager.



Minute Hour Day Month Weekday

*/10 * * * *


If you are having load problems let me know, I did a small change to httpd.conf which reduced my server load by 500% at peak times.
 

Networkologist

Well-Known Member
Feb 5, 2003
213
1
168
Lurking...

Wouldn't know if 10 minutes or 10 hours is the best setting, but I'd appreciate a copy
 

mohit

Well-Known Member
Jul 12, 2005
553
0
166
Sticky On Internet
Re:

casey,
i don't think you should be doing this to your box, if your apache crashes it would be best to solve the problem just restarting it using a cron would not solve the problem and it could happen more frequently when you have traffic to serve.

If you have hired it with some service provider he might be able to solve the issue, if you raise the ticket with them.

you can also look for errors in error logs and find out the exact cause or you can ask a system admin to do it for you.

After all even 10Mins of downtime would not be liked by any clients if you are serious in hosting biz.

see ta,
mohit
 

casey

Well-Known Member
Jan 17, 2003
2,303
0
191
mohit said:
casey,
i don't think you should be doing this to your box, if your apache crashes it would be best to solve the problem just restarting it using a cron would not solve the problem and it could happen more frequently when you have traffic to serve.

If you have hired it with some service provider he might be able to solve the issue, if you raise the ticket with them.

you can also look for errors in error logs and find out the exact cause or you can ask a system admin to do it for you.

After all even 10Mins of downtime would not be liked by any clients if you are serious in hosting biz.

see ta,
mohit
This is a 3 year old thread. I don't do that anymore. ;)
 
Status
Not open for further replies.