Apache restarting every 10 minutes

UltimeWWW

Verified User
Joined
Sep 10, 2003
Messages
217
Location
Montreal
Hi,

Apache seems to restart every 10 minutes (At XX:X2).

It cause the server to be unavailable during some seconds (It bugs me!).

Is it DA that rehash or restart Apache?
 

S2S-Robert

Verified User
Joined
Jun 24, 2003
Messages
415
Location
The Netherlands
It shouldn't do that, but perhaps there is a cron job running that does this. Try looking in the cron jobs to see what's going on.

Perhaps there is some issue that's making apache restart every ten minutes. Is it exactly 10 minutes by the way?
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,037
Whenever a new site is added, apache has to be restarted in order to read in the new VirtualHosts with SSL certificates. If only a reload is done with new certificates, apache will complain and say that a full restart is required. So it might just people people adding sites, or it may be some cron as mentioned in the previous post.

You can check if it's DA by having a look at the /var/log/directadmin/system.log

John
 

UltimeWWW

Verified User
Joined
Sep 10, 2003
Messages
217
Location
Montreal
It is pretty weird:

2003:11:28-04:51:01: httpd restarted
2003:11:28-05:11:01: httpd restarted
2003:11:28-05:22:01: httpd restarted
2003:11:28-05:31:01: httpd restarted
2003:11:28-05:42:01: httpd restarted
2003:11:28-05:52:01: httpd restarted
2003:11:28-06:11:19: httpd restarted
2003:11:28-06:21:02: httpd restarted
2003:11:28-06:31:01: httpd restarted
2003:11:28-06:41:02: httpd restarted
2003:11:28-06:52:02: httpd restarted
2003:11:28-07:11:11: httpd restarted
2003:11:28-07:21:02: httpd restarted
2003:11:28-07:31:01: httpd restarted
2003:11:28-07:41:01: httpd restarted
2003:11:28-07:51:01: httpd restarted
2003:11:28-08:12:01: httpd restarted
2003:11:28-08:21:02: httpd restarted
2003:11:28-08:31:01: httpd restarted
2003:11:28-08:42:17: httpd restarted
2003:11:28-08:51:02: httpd restarted
2003:11:28-09:12:02: httpd restarted

Any idea?
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
John, can i ask how the DA apache checker works also.... is it done by pings to the server or by checking apaches *actual* status?

Chris
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
hmm not sure then.... log files are all reasonable size (not really a direct cause although I know a few bits of software dislike it and im sure i have seen a problem with apache and large log files previously)

whats your server load like also?

Chris
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,037
Hello,

Well, you'd see something like
Code:
2004:01:09-11:34:01: service httpd wasn't running, starting it
in the errortaskq.log if apache was down. So it's probably just your users doing their usual stuff, like adding subdomains, ssl certificates, cretaing new users..etc. Those are all things that require.

You can cross check the times of the restarts with the directadmin logs (eg: 2004-Jan-09.log) to see if any commands that were run would do something for a restart. (the command would be run upto 1 minute before the restart).

John
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
Reason I asked why DA checked pings or apache would again not leave that though.....

If the max connections gets hit then pings may stop.. therefore directadmin would restart apache if the max connections were high and directadmin was based on pings, however if the sites were static as he said with very little traffic then this is likely not to be the problem.

Apart from the last suggestion.... not to sure what to suggest if the problem is still occuring, possibly a reboot to clean anything up - possibly recompile apache? could be anything

Chris
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,037
Hello,

DA just check for the "httpd" process in the /proc directory. Not too sure about speeding it up.. anything that will make it boot faster would be a good thing... maybe comment out the ErrorLogs from the virtualhost templates.. opening a few hundred files might take a while (apache opens, and holds open the error logs. The usage logs are only opened/appended to when needed). Of course, that would stop the logging of errors in their own file...

John
 

UltimeWWW

Verified User
Joined
Sep 10, 2003
Messages
217
Location
Montreal
I think I found it. We we're doing the tally every 10 minutes. I suppose it do restart Apache every 10 minutes...so it works now :)

Thanks.
 
Top