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.

Stu
  • 1,282
  • 12
  • 29
  • First google answer, [1]: http://stackoverflow.com/questions/4656874/what-does-the-cryptic-gc-cache-entry-mean Maybe that's answer your question? – yokoloko Aug 04 '11 at 08:15
  • 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. – Stu Aug 12 '11 at 09:57

2 Answers2

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.

Anton Babenko
  • 6,586
  • 2
  • 36
  • 44
3

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

Stu
  • 1,282
  • 12
  • 29
  • 3
    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. – matteo Feb 07 '14 at 20:58