3

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?

Frank Farmer
  • 38,246
  • 12
  • 71
  • 89
Vacilando
  • 2,819
  • 2
  • 30
  • 27

2 Answers2

5

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
  • 1,961
  • 1
  • 13
  • 15
5

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

Collector
  • 2,034
  • 4
  • 22
  • 39