httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: reopening of logs without restarting
Date Fri, 22 Jan 2010 19:03:35 GMT
On Fri, Jan 22, 2010 at 1:43 PM, Mikhail T. <> wrote:
> Hello!
> 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.
> Currently there are ap_run_open_logs and worker_open_logs. Can my
> hypothetical signal-handler simply go through the list of opened
> descriptors, set them to new values and close the old?

You'd need to do that in every child process, without interfering with
current log file use.

> Or is this a "hairy" task, that some have tried, but nobody succeeded
> in implementing?

I'm not sure "hairy" captures the complexity adequately.

View raw message