Re: Interesting APC behaviour

From: Date: Sun, 28 Oct 2012 13:52:57 +0000
Subject: Re: Interesting APC behaviour
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9939@lists.php.net to get a copy of this message
On 10/28/2012 04:54 AM, Terry Ellison wrote: > From the perspective of a production sysadmin, I've always just set > apc.stat=0 but then cleared the cache following any change. This gives > the best of both worlds: the performance dividend of no stat'ing and > avoiding the weird gremlins that sometimes occurred if I didn't flush > the cache. The one-off hit for repriming the cache again is pretty > small and the "release from dev to live" cycle isn't a common event. > For a multi-app configuration, it would be a very simple matter to write > an admin script which clears the cache based on some REGEX filename > match, so that this could be integrated into application release scripts. This causes deploy race conditions though. You want requests that are already in progress right when the deploy happens to continue executing with all the old versions of the scripts. The PHP realpath cache helps here. If you clear out the opcode cache on the deploy you end up with these requests all picking up the new version mid-request. -Rasmus

« previous php.pecl.dev (#9939) next »