views:

577

answers:

2

If APC stores a lot of entries, clearing them crashes 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)

Is there some other quick but safe way of bulk cleanup of APC cache?

+2  A: 

You can remove the time limit on a script you're running (as long as you don't run php in safe mode)

set_time_limit(0);

This will remove the time limit for the script

http://au2.php.net/manual/en/function.set-time-limit.php for more details

Thomas Winsnes
I just noticed that this was the suggested workaround for the problem in the link you posted :)
Thomas Winsnes
A: 

You can also gracefully restart apache and it will reload with a clean APC.

Collector