Am 03.08.2011 18:31, schrieb Jarry:
> On 03-Aug-11 18:17, Michael Mol wrote:
>>> ---
>>> [Wed Aug 03 03:10:01 2011] [notice] Graceful restart requested,
>>> doing restart
>>> ---
>>> What could have caused this? BTW I noticed all apache logs
>>> have been rotated exactly at this time. Is that a reason
>>> why apache was restarted? I never noticed it...
>>
>> Very likely. logrotate would ask apache to restart so that it can move
>> the old log file out of the way.
>
> You are right. I just found this in /etc/logrotate.d/apache2 :
> /var/log/apache2/*log {
> missingok
> notifempty
> sharedscripts
> postrotate
> /etc/init.d/apache2 reload > /dev/null 2>&1 || true
> endscript
> }
>
> But is it actually necessary to do it? I mean everything between
> postrotate-endscript is done after the log file has been rotated.
> So I do not understand why at that time apache must be reloaded.
>
> Moreover, because of that apache-reloading apc was emptied so it
> takes again some time till all php-scripts are in cache again...
>
> JarryYes, it is necessary. Apache has to re-open the log files or otherwise it will keep writing to the already deleted file instead of creating a new one. You need to do the same for syslog-ng, BTW. See /etc/logrotate.d/syslog-ng. Regards, Florian Philipp
signature.asc
Description: OpenPGP digital signature

