How to clear APC cache without Apache crashes?

If APC stores many records, clearing them will cause httpd to fail.

If apc_clear_cache ("user") takes longer than phps max_execution_time script call apc_clear_cache will be completed by php before the cleanup operation is completed. it seems to leave some pens or sth. which will prevent apache from closing it is being processed.

( http://pecl.php.net/bugs/bug.php?id=13445 )

Is there any other quick but safe way to bulk clear the APC cache?

+2
source share
2 answers

You can remove the time limit on the script that you are using (until you 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

+4
source

You can also gracefully restart apache and reboot with clean APC.

+5
source

Source: https://habr.com/ru/post/1314255/


All Articles