cronolog.org
flexible web log rotation
HOME
DOWNLOAD
FEATURES
USAGE
FAQ
BLOG
KNOWN BUGS
SECURITY
PATCHES
USERS
TO DO
HISTORY
LINKS
FEEDBACK
MAILING LIST
ADVERTISING

support cronolog development



Google   HELP


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CRONOLOG: apache restart hangs with cronolog



> Hi list,
>
> I'm using cronolog ( 1.6.2 ) to rotate the access and errorlog on
> my webserver ( apache 1.3.26 on solaris 8/sparc ) for a few virtual
> hosts.
>
> Every virtual host has his own access and error log which are
> rotated by cronolog.
>
>   ErrorLog "|/usr/local/cronolog/sbin/cronolog \
>   /var/log/apache/hostname_error.%Y%m%d"
>   CustomLog "|/usr/local/cronolog/sbin/cronolog \
>   /var/log/apache/hostname_access.%Y%m%d" combined
>
> This works fine, but when I restart apache with "apachectl restart",
> the parent http daemon and the cronologs processes hang and I've to
> kill the apache daemon with "kill -9".
>
> If I disable cronolog in the httpd.conf, the "apachectl restart" command
> works fine.
>
> Does someone have a solution to this problem?
If you search the archives, this issue was discussed a few times. It seems
to be the way cronolog is exec'ed by apache. I think Apache 2.0 doesn't have
this issue.
Anyway, this even exists as a bug report in Apache but has never been
addressed.
Try this: add "exec" after pipe
Example:
ErrorLog "|exec /usr/local/cronolog/sbin/cronolog \
                /var/log/apache/hostname_error.%Y%m%d"
HTH
Victor

Copyright © 1996-2010 Andrew Ford and Ford & Mason Ltd