如果 APC 存储了大量条目,清除它们会使 httpd 崩溃。
如果 apc_clear_cache('user') 花费的时间超过 phps max_execution_time,则调用 apc_clear_cache 的脚本将在清除操作完成之前被 php 终止。这似乎留下了一些句柄或某事。这将阻止 apache 关闭它的进程。
( http://pecl.php.net/bugs/bug.php?id=13445 )
是否有其他快速但安全的批量清理 APC 缓存的方法?
如果 APC 存储了大量条目,清除它们会使 httpd 崩溃。
如果 apc_clear_cache('user') 花费的时间超过 phps max_execution_time,则调用 apc_clear_cache 的脚本将在清除操作完成之前被 php 终止。这似乎留下了一些句柄或某事。这将阻止 apache 关闭它的进程。
( http://pecl.php.net/bugs/bug.php?id=13445 )
是否有其他快速但安全的批量清理 APC 缓存的方法?
您可以删除正在运行的脚本的时间限制(只要您不在安全模式下运行 php)
set_time_limit(0);
这将删除脚本的时间限制
http://au2.php.net/manual/en/function.set-time-limit.php了解更多详情
您也可以优雅地重新启动 apache,它将使用干净的 APC 重新加载。