httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail T." <mi+t...@aldan.algebra.com>
Subject reopening of logs without restarting
Date Fri, 22 Jan 2010 18:43:35 GMT
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?

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

Thanks! Yours,

	-mi

Mime
View raw message