php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58015 error messages gc-list
Submitted: 2008-01-22 10:39 UTC Modified: 2009-05-05 14:54 UTC
From: an dot scott at neu dot edu Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 4_4 CVS-2008-01-22 OS: Linux
Private report: No CVE-ID: None
 [2008-01-22 10:39 UTC] an dot scott at neu dot edu
Description:
------------
numerous error messages "[apc-warning] GC cache entry 'filename' was on gc-list for n seconds". n being as high as 6540823 seconds, or about 75 days on a server that was restarted only 4 days ago.

This is with php 4.8.8, and Apache 2.0.61. I don't remember seeing these errors with the previous version of APC, or the previous version of php (4.4.7).




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-29 20:29 UTC] shire@php.net
Do you have a way to reproduce this?  It would help us to debug, as well as listing your ini settings.  When do these errors occur (how long after restart, under load, etc).

We're also going to stop officially supporting php-4.x.x, so it's also recommended that you upgrade to php-5.x.x.  Which version of apc are you using, can you try out the latest release?
 [2008-01-30 12:42 UTC] an dot scott at neu dot edu
This is the most recent version of APC, 3.0.16. I didn't notice if it happened with any earlier versions. Just checked earlier errorlogs. First occurrence of this problem was with the update to apc 3.0.15 on dec 13, 2007. The system was running php 4.4.7 at the time. The first error happened about 15 hours after apache was re-started with the new version of apc (3.0.15). Checking error logs back to Nov 1 2008 there are no apc errors. apc version at that time was 3.0.14 I believe. 

The errors in the current log have started as early a about 1 1/2 hours after restarting apache, to as long as about 5 hours. Not sure what the load is like when the errors occur.

Trying to move to php 5, but have a lot of users/scripts which need to be migrated, and there are a few definite problem scripts. Hard to get everyone to fix these, but have been urging this.

Should add that I just did a 'graceful' restart of apache to add a vdomain at 11:37 am. and haven't seen any errors yet.

The following is my current setup for compiling apc:

./configure --enable-apc \
        --disable-apc-mmap \
        --with-apxs=/usr/local/apache2/bin/apxs \
        --with-php-config=/usr/local/bin/php-config

I had tried semaphores, but disabled and re-installed to see if that has any effect on the errors. the system had 128 of shared memory. Current php.ini apc section follows:

apc.ttl = 14400
apc.optimization=0
apc.num_files_hint=1024
apc.enabled=1
apc.enable_cli=1
# apc.shm_segments=2
apc.shm_size=128
apc.max_file_size=3M
 [2008-02-11 15:39 UTC] an dot scott at neu dot edu
I just noticed another oddity. The time in the error logs for the apc-warning GC cache entry errors is off from the other error in the log. Often get 'file not found' errors for 'favicon.ico', and the apc error have times that are behind the previous non-apc error by in at least one case 7 minutes.

Time portion of error_log entries belot:

[Mon Feb 11 15:22:08 2008] [error] [client 63.118.183.10] File does not exist: /home/hist
[Mon Feb 11 15:15:23 2008] [apc-warning] GC cache entry '/home/doe/web-docs/partnerships/
[Mon Feb 11 15:15:23 2008] [apc-warning] GC cache entry '/home/socant/web-docs/faculty/ma

As you can see, the error for '/home/hist' is at 3:22 pm, while the following apc error is at 3:15 pm.
 [2009-03-22 20:03 UTC] shire@php.net
Sorry for the lack of follow up on this, but could you tell us if it's still an issue and if you had an opportunity to upgrade.  The difference in times on your log is likely due to a delay between processes and the flushing to the log file, I wouldn't worry too much about it.  

In general however, I see these GC errors occur due to timeouts in scripts and other problems that leave references to files that are cleared from the cache.  You may also want to make sure you aren't exhausting your memory and causing a cache flush.
 [2009-03-27 04:53 UTC] s dot tretter at szene1 dot at
We have the same "error messages" with php 5.2.6.. after some time following messages appear in error log:
"GC cache entry '/www/asdf/htdocs/lib/Szene1/Event/Event/Lovestate.php' (dev=2052 ino=0) was on gc-list for 5461871 seconds
[Fri Mar 27 10:13:09 2009] [apc-warning] GC cache entry '/www/v3.szene1.at/htdocs/application/classes/Html/PNGenerator.php' (dev=2052 ino=0) was on gc-list for 5462056 seconds
[Fri Mar 27 10:15:48 2009] [apc-warning] GC cache entry '/www/v3.szene1.at/htdocs/application/classes/Weblife1/MembershipManager.php' (dev=2052 ino=0) was on gc-list for 5473164 seconds

but apache is still running..it's also only mentioned as "warning"..so what is the impact of this message?

ng
 [2009-05-05 14:54 UTC] shire@php.net
This message signifies that you likely had a request terminate while still holding references to files within the cache.  When a request begins it increments a refcount to a file in the cache.  If this request does not finish then the refcounts are still held and the cache is not able to delete these immediately, so they are placed on a garbage collection list.  If an entry is on a GC list for a time greater than gc_ttl, then it is removed and the warning is displayed.  This is a sign that you have requests terminating unexpectedly due to a timeout, segfault, or other fatal situation.  If this is known or expected then the error is of no consequence.
 [2011-08-12 06:03 UTC] anonymous at anonymous dot com
Since this warning often fires in the middle of any script and 
APC can continue without problems, for those of us who treat 
E_WARNINGs as errors and terminate a script, it seems that 
this message should be a E_NOTICE instead.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 15:01:29 2024 UTC