Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

APC - how to handle GC cache warnings?

Tags:

php

apc

On occasion, maybe once a day, our PHP web server using APC will raise an E_WARNING error that my error handler catches and logs. It looks similar to this:

require_once() [function.require-once]: GC cache entry '/path/file.php'
(dev=47775802 ino=183046) was on gc-list for 3602 seconds -
in /path/some_other_file.php(31)

Is this a recoverable error? Should I just ignore these warnings?

I've currently got it so that the script dies on E_WARNINGs because we want the code stable and most warning's I've seen are not continuable (missing includes, asserts, etc.)

APC has plenty of memory, 100MB, and only approx. 32MB used by both File and User caches.

like image 826
Stu Avatar asked Aug 04 '11 07:08

Stu


2 Answers

In case you are thinking about APCU (PHP 5.5) I suggest to upgrade APC to the version, where this PR is merged. APCU 4.0.3 at least.

like image 169
Anton Babenko Avatar answered Oct 15 '22 04:10

Anton Babenko


From what I can tell from Googling, this has no effect on the currently running script and therefore the warning can be ignored.

like image 20
Stu Avatar answered Oct 15 '22 03:10

Stu