php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59351 APC is running out of memory and not rotating
Submitted: 2010-08-09 17:40 UTC Modified: 2016-08-31 15:40 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:3 of 4 (75.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: bbell at kaango dot com Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5.3.2 OS: Centos 5.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bbell at kaango dot com
New email:
PHP Version: OS:

 

 [2010-08-09 17:40 UTC] bbell at kaango dot com
Description:
------------
PHP 5.3.3
APC 3.1.4

After 30 minutes running out of memory on PHP 5.3.3. 

See screenshots.

The memory should by FIFO controlled.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-09 17:44 UTC] bbell at kaango dot com
Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0

Description:
------------
PHP 5.3.3
APC 3.1.4

After 30 minutes running out of memory on PHP 5.3.3. 

The memory should by FIFO controlled.

General Cache Information
APC Version	3.1.4
PHP Version	5.3.3
APC Host	www.newui.bbell.artemis.dnvr-hq.kaango.com
Server Software	Apache
Shared Memory	1 Segment(s) with 128.0 MBytes
(mmap memory, pthread mutex locking)
Start Time	2010/08/09 17:04:02
Uptime	31 minutes
File Upload Support	1
File Cache Information
Cached Files	1377 (127.4 MBytes)
Hits	9385
Misses	1586
Request Rate (hits, misses)	5.78 cache requests/second
Hit Rate	4.94 cache requests/second
Miss Rate	0.84 cache requests/second
Insert Rate	0.73 cache requests/second
Cache full count	200
User Cache Information
Cached Variables	0 ( 0.0 Bytes)
Hits	0
Misses	0
Request Rate (hits, misses)	0.00 cache requests/second
Hit Rate	0.00 cache requests/second
Miss Rate	0.00 cache requests/second
Insert Rate	0.00 cache requests/second
Cache full count	0
Runtime Settings
apc.cache_by_default	1
apc.canonicalize	1
apc.coredump_unmap	0
apc.enable_cli	0
apc.enabled	1
apc.file_md5	0
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	3600
apc.include_once_override	0
apc.lazy_classes	0
apc.lazy_functions	0
apc.max_file_size	1M
apc.mmap_file_mask	/tmp/apc.B6FnZP
apc.num_files_hint	1024
apc.preload_path	
apc.report_autofilter	0
apc.rfc1867	0
apc.rfc1867_freq	0
apc.rfc1867_name	APC_UPLOAD_PROGRESS
apc.rfc1867_prefix	upload_
apc.rfc1867_ttl	3600
apc.shm_segments	1
apc.shm_size	128M
apc.slam_defense	75
apc.stat	1
apc.stat_ctime	0
apc.ttl	7200
apc.use_request_time	1
apc.user_entries_hint	4096
apc.user_ttl	7200
apc.write_lock	1

Used: 128.0 MBytes (100.0%)
Free: 12.3 KBytes (0.0%)

Fragmentation: 100.00% ( 12.3 KBytes out of 12.3 KBytes in 4 fragments)
 [2010-08-09 17:46 UTC] rasmus@php.net
There is no point in doing FIFO if you are going to fill it in 
30 minutes.  FIFO is also much too slow.  You need to either 
cache less (by using apc.filter) or you need to increase your 
shared memory allocation for APC.  There is no bug here.
 [2010-08-09 18:06 UTC] bbell at kaango dot com
When I switch to anonymous:

;  apc.mmap_file_mask=/tmp/apc.XXXXXX

I do not fill the memory in 30 minutes.

I think this is still a bug.
 [2010-08-10 06:17 UTC] jagiello dot lukasz at gmail dot com
Same problem with "Unknown: Unable to allocate memory" at:

PHP 5.2.5
APC 3.1.4

At APC 3.1.3p1 everything works ok.
 [2010-08-18 10:00 UTC] interas at web dot de
Same problem here with PHP 5.3. With APC 3.1.3p1 our webservers used to run for months without getting near the cache limit.

After upgrading to APC 3.1.4 the limit had been hit after one (!) hour, giving the "Unable to allocate memory for pool" errors (which we hadn't even seen ever before).

BTW, the cache size is displayed properly on apc.php, and we had also added the "M" in the config file to the size value.
 [2010-08-26 04:25 UTC] freesd-questions at stellablue dot org
It's a bug for people doing shared hosting. The old APC handled users having too many scripts to cache. The new one blows up.

There needs to be a "if it's full, oh well, not going to cache more" functionality, not a "I'm going to explode and piss off all your shared hosting customer" functionality.
 [2011-03-07 04:05 UTC] goetas at lignano dot it
i have the same issue on slackware, php 5.3.3 and apc 3.1.7!
 [2016-08-31 15:40 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:40 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this issue won't get fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC