public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Florian Philipp <lists@binarywings.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] apache: what could cause "graceful restart requested"?
Date: Wed, 03 Aug 2011 18:43:04 +0200	[thread overview]
Message-ID: <4E397A98.50505@binarywings.net> (raw)
In-Reply-To: <4E3977DE.4030007@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]

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...
> 
> Jarry

Yes, 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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  parent reply	other threads:[~2011-08-03 16:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03 16:12 [gentoo-user] apache: what could cause "graceful restart requested"? Jarry
2011-08-03 16:17 ` Michael Mol
2011-08-03 16:31   ` Jarry
2011-08-03 16:40     ` Michael Mol
2011-08-03 16:48       ` Florian Philipp
2011-08-03 16:59         ` Jarry
2011-08-03 16:43     ` Florian Philipp [this message]
2011-08-03 16:20 ` Paul Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E397A98.50505@binarywings.net \
    --to=lists@binarywings.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox