httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: reopening of logs without restarting
Date Fri, 22 Jan 2010 19:18:58 GMT
On 22 Jan 2010, at 8:43 PM, Mikhail T. wrote:

> Some of our web-servers take a while to restart (because some custom
> modules need to login to database backends, etc.) This makes it
> undesirable for us to use the SIGUSR1 (for graceful restart) and we
> currently log to stdin of an easier to restart command-line utility.
>
> How hard would it be to implement a separate signal-handler, which
> would -- upon receiving, say, SIGUSR2 -- reopen the log-files without
> performing a full restart of each worker? That would provide for a
> possibility to log straight into a file and rotate that once in a  
> while
> without a full restart of the httpds.

What you're probably after are piped logs:

http://httpd.apache.org/docs/2.2/logs.html#piped

If you pipe the log to something like cronolog, cronolog is able to  
rotate logs for you without needing to restart httpd.

Regards,
Graham
--


Mime
View raw message