APC - how to handle GC cache warnings?
Asked Answered
C

2

6

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.

Charlton answered 4/8, 2011 at 7:14 Comment(2)
First google answer, [1]: #4657374 Maybe that's answer your question?Virginia
Thanks. So I think if I'm reading that thread correctly, this warning is basically benign (has no negative affect on the currently running script) and so I should ignore it. Ideally APC would post this error as E_NOTICE instead.Charlton
C
3

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

Charlton answered 27/8, 2011 at 5:42 Comment(1)
So given it can be ignored, how do you suppress it? If you have an error handler that catches all warning (as for example in a framework like Yii), it will catch this one as well.Lowtension
B
9

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.

Bellboy answered 20/3, 2014 at 18:7 Comment(0)
C
3

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

Charlton answered 27/8, 2011 at 5:42 Comment(1)
So given it can be ignored, how do you suppress it? If you have an error handler that catches all warning (as for example in a framework like Yii), it will catch this one as well.Lowtension

© 2022 - 2024 — McMap. All rights reserved.