开发者

Clearing APC caches without crashing our scripts

开发者 https://www.devze.com 2023-01-04 23:59 出处:网络
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.

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?


  1. Tell scripts to stop.
  2. Clear APC cache.
  3. Tell scripts to start.
0

精彩评论

暂无评论...
验证码 换一张
取 消