php - 如何在不使 Apache 崩溃的情况下清除 APC 缓存?

标签 php performance caching apc

如果 APC 存储了大量条目,清除它们会使 httpd 崩溃。

If apc_clear_cache('user') takes longer than phps max_execution_time the script calling apc_clear_cache will be terminated by php before the clearing-operation is finished. this seems to leave some handles or sth. that will prevent apache from closing it's processes.

( 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了解更多详情

关于php - 如何在不使 Apache 崩溃的情况下清除 APC 缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2228213/

相关文章:

Xcode 4 变得非常慢并且杀死了我的硬盘

performance - Laravel Redis 缓存

PHP html实体

php - 如何获取 WooCommerce 订单详细信息

c# - Entity Framework 投影到类比选择 EF POCO 对象更快,为什么?

django - 如何优化复杂查询 django 1.8

java - JBOSS 服务器上的 Web 应用程序缓存 - 未使用缓存

firefox - 如何从 :cache? device=disk 获取内容

php - 如何使用 PDO 在一次数据库行程中插入多条记录?

php - 内置 PHP 的 Silex 网络服务器