Summary: | apache does not reopen logs when multiple graceful restarts happen in quick succession | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Rainer Canavan <rainer-apache> |
Component: | mod_log_config | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | REOPENED --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.2.26 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Rainer Canavan
2014-01-10 15:39:03 UTC
> I've tried httpd 2.2.22, 2.2.24 and 2.2.26 on debian Wheezy (i686), RHEL 6.5
> x86_64 and SLES 11 SP2 x86_64, all of which show the described behavior. The
> deleted access_log.1 is used even by children forked after the previous ones
> have exceeded their MaxRequestsPerChild.
Logs are opened in the parent, not in the children. New children cannot be expected to reopen logs that have been deleted out from under them, this requires at least a graceful restart.
Based on these comments, tt sounds like in some way you may know that a graceful does not always follow your unlink, so I am marking as invalid.
Can you explain why the loop while true; do apachectl graceful; sleep 5; done is required to trigger this behaviour if there's only one apachectl graceful in the logrotate config, or, alternatively the logrotate must have multiple sections with one apachectl graceful in each section to causes the described behaviour? > Can you explain why the loop
>
> while true; do apachectl graceful; sleep 5; done
>
> is required to trigger this behaviour if there's only one apachectl graceful
> in the logrotate config, or, alternatively the logrotate must have multiple
> sections with one apachectl graceful in each section to causes the described
> behaviour?
I assume there are windows where nearly simulataneous gracefuls happen don't "stack", and that somehow leads to you unlinking without a graceful being processed after. But i don't think there is a remedy in httpd.
I think the fact that just running logrotate -f with a single section over and over again does not cause the problem to happen, as opposed to doing the same and running a separate loop with just apachectl graceful and sleep, is a clear indicator that logrotate is not at fault. |