Re: [APC-DEV] APC + Apache SIGHUP
[email protected] (Gopal V) Thu, 08 Oct 2009 15:37:59 +0530
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
Nathan Clemons wrote: > We do some pretty standard Apache log rotation on our web cluster with > logrotate; move the file to an archival point, send a SIGHUP to Apache > so it releases the open file handle, and then bzip2 up the data for > archival purposes. I'm almost sure this is an apache thing and nothing apc can really do about it. [Thu Oct 08 15:23:27 2009] [notice] SIGHUP received. Attempting to restart We hit mshutdown - 9345 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName We hit minit - 9345 is what my apache2 says. Just to be double+good, I put a couple of printfs in module init/module shutdown code. And I can see that a SIGHUP essentially stops and restarts the php modules directly. > isn't something we particularly like, since we're caching our > localization data inside of APC (using apc_store). So basically the apc module init is called again in the parent process after it gets a SIGHUP. It's not that apc is clearing its cache or handling the HUP, apache is essentially doing an internal soft restart. http://httpd.apache.org/docs/2.2/stopping.html#hup > localization data is pulled from. Ideally we'd like to see a staggered > situation where the servers are not all pulling at the same time, but > we don't want to change when our logs are rotated as that would > introduce difficulties in our reporting infrastructure. I can see your problem, but each of these bits are actually functioning as they were designed to be. MSHUTDOWN *has* to cleanup memory because it cannot see into the future and predict whether an MINIT is to follow. > Is this a generic artifact of APC and Apache interactions, or is there > some configuration change I can make to alter this behavior? I don't think you can change the way it behaves without some non-standard patching. But I'm open to actually getting your problem solved, even if it doesn't get into SVN. Cheers, Gopal -- If I learn from my mistakes, pretty soon I'll know everything.