httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From crocket <>
Subject Re: httpd should be able to reopen log files without a restart.
Date Tue, 11 Oct 2011 14:10:08 GMT
How exactly does it work? Will it be documented?

On Tue, Oct 11, 2011 at 10:28 AM, Brian J. France <> wrote:
> apr trunk has APR_FOPEN_ROTATING support (stat checking and re-open), which is based
on a patch we use at work.  This allows us to move the log file, wait 90 seconds and then
compress the moved log file, all without touch the server as it will stat the log ever 60
and re-open it if needed before writing a log line.
> Of course it is in trunk, so may take a bit to get it into a release.
> Brian
> On Oct 10, 2011, at 9:16 PM, crocket wrote:
>> When some softwares(including stunnel) receive SIGUSR1, they reopen a
>> log file without re-reading configuration files or restarting.
>> Since httpd uses SIGUSR1 for graceful restart, it could use SIGUSR2
>> purely for reopening log files.
>> Why do people need this signal?
>> A graceful restart doesn't kill active children processes, and those
>> processes still write on an old log file.
>> logrotate can be configured to compress old log files, in which case
>> httpd would try to write onto a compressed log file.
>> Since httpd can't log to a file, it would show abnormal behaviors or
>> even abort downloads from httpd.
>> So SIGUSR2 can come in handy.

View raw message