|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-03-20 07:13 UTC] lgr888999 at gmail dot com
Description:
------------
Notice: Using php 5.2.5 which is not available in the list above
Ive made a warmup script to 1) clear the cache 2) fill the cache
While filling the cache with 70 000 entries takes only 1.5 second running apc_clear_cache('user') afterwards takes 50-200 seconds.
I took a look in apc.c to see how the clearing works and it seems like it deletes one entry at the time, is that correct?
Would be cool if there could be some purge option to just swap out everything, which I thought apc_clear_cache did.
Expected result:
----------------
Cleanup: 3.6001205444336E-5s
Warmup: 1.6538591384888s
Actual result:
--------------
Cleanup: 51.65371680259s
Warmup: 1.6538591384888s
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
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. This was confirmed on a 32bit 2.6.9 CentOS with PHP 5.1.6, Apache 2.0.59 using php-pecl-apc.i386 version 3.0.12-1.el4.centos. It took our server down for one night running about 2000 apache processes that waitet for termination. restarting the server helped for one day but than that effect came back. adding set_time_limit(0) just before apc_clear_cache solved the problem.