How to disable log rotate? Apache restarting every night!

chasebug

Verified User
Joined
Aug 31, 2009
Messages
18
Apache is restarting every night at the same time.

This is really annoying as I have users downloading 700MB files from my site so their download keeps getting cancelled midway.

I already moved log rotate out of daily cron but it's still restarting apache!

What's another method to disable it or stop it from restarting apache?
 
You cant change it its the way it was designed. You can only change the log rotate cron to run at a different time or chmod 0 /etc/init.d/httpd but then you cant restart, start, or stop httpd via directadmin web interface anymore.
 
Find your logrotate configuration files and change the appropriate setting.

Jeff
 
The config file is set to rotate logs WEEKLY why is it still restarting apache everyday at the same time?

Many users are complaining that my site is unstable because of all the broken downloads due to apache restarting.

It's been over 3 years since first posts about this surfaced and there is still no fix for this yet? At least tell us how to disable it for those who don't want log rotate...
 
Hello,

The nightly tally is what restarts apache.
There are a few options you can use.

1) lower the tally frequency by editing /etc/cron.d/directadmin_cron
Related guide, but just lower the frequency:
http://help.directadmin.com/item.php?id=48

2) Change DA to issue a graceful restart instead of a full restart, which won't hurt downloads:
http://www.directadmin.com/features.php?id=980

3) Lastly, to bypass all DA control, just take over the /etc/init.d/httpd boot script, and change the calls, so that when DA calls a restart, it doesn't actually restart. It would then be up to you to ensure that a true restart (or graceful restart) happens when it needs to.

Most likely, the graceful restart will be a better solution in that you dont lose any feature functionality.

Note that after any new VirtualHost with SSL is added (by new User, new Domain, new Subdomain, SSL change, etc) a full apache restart (or graceful restart) is required.

John
 
You've managed to confuse me, John. I thought you once wrote that you can't use a graceful restart because of some reason i don't recall. But here it looks like you're writing that graceful restart can always be used.

If that's true, then why don't you just use grateful restart?

Am I missing something?

Thanks!

Jeff
 
Hello,

That was a while back.. may have been referring to apache 1.3 (I can't quite recall either). The recent tests I did with apache 2.2 seemed to work ok, so I've put it as a beta feature, as mentioned in the guide. If it proves itself to work just fine, then we may consider using it as the default.

John
 
Back
Top