Currently, when we update our PHP code f开发者_StackOverflowor our website, we have a script that calls apc_clear_cache on all servers, so that the new code will be used.
We also have some PHP scripts that run in the background on a separate server, processing some slower queries, and the like. The same script that calls apc_clear_cache also notifies the scripts to exit when they reach a reasonable stopping point. The problem is that apc_clear_cache takes effect immediately, and some of the scripts that are not at a stopping point will reproducibly hang.
Does anyone know of a way around this problem aside from stopping all of these scripts (at the appropriate time), THEN calling apc_clear_cache, THEN restarting them all?
- Tell scripts to stop.
- Clear APC cache.
- Tell scripts to start.
精彩评论