php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62863 APC 3.1.12: "apc_store(): Unable to allocate memory for pool"
Submitted: 2012-08-19 08:03 UTC Modified: 2012-09-08 17:49 UTC
Votes:43
Avg. Score:4.7 ± 0.5
Reproduced:41 of 42 (97.6%)
Same Version:35 (85.4%)
Same OS:19 (46.3%)
From: greenreaper at hotmail dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.4.6 OS: FreeBSD 8.1-RELEASE-p4 x64
Private report: No CVE-ID: None
 [2012-08-19 08:03 UTC] greenreaper at hotmail dot com
Description:
------------
After upgrading to 3.1.12 from 3.1.11, our Apache-served websites (MediaWiki and Drupal) start falling over after a minute or so of use with "apc_store(): Unable to allocate memory for pool". It seems existing cached items can be accessed but it cannot store new data.

apc.php looks right to start with, but a minute or so in it switches from reporting "Fragmentation: 0.86% ( 4.0 MBytes out of 467.8 MBytes in 37 fragments)"  to "Fragmentation: 0%" (with no subsequent text). It has 683 ( 42.2 MBytes) cached files and 534 ( 1.5 MBytes) cached variables at the break point.

We are using mmap memory and spinlocks, and have been doing so successfully for several versions with the following settings:

[apc]
apc.enabled=1
apc.shm_size=1G
apc.user_ttl=172800
apc.ttl=0
apc.stat=1
apc.user_entries_hint=60000
apc.filters=languages/messages,test/.*/includes/filerepo,test/.*/includes/specials
apc.rfc1867=1
apc.slam_defense=0


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-19 23:48 UTC] john dot marshall at riverwillow dot com dot au
- FreeBSD 8.3-RELEASE
- Apache 2.2.22
- PHP 5.4.5

After 3.1.12 upgrade, apc.php very soon showed 100% cache used. Soon after, httpd had consumed all physical memory and the systems were swapping. Reverted to APC 3.1.11 and all OK again.
 [2012-08-21 10:58 UTC] kyrylkov at gmail dot com
We have the same problem:

- FreeBSD 9.0-RELEASE
- Apache 2.2.22
- PHP 5.4.5

Reverting to 3.1.11 solves it.
 [2012-08-21 12:52 UTC] bashofmann at gmail dot com
We can verify this as well:

- Ubuntu 10.04 Lucid
- Apache/2.2.14 (Ubuntu)
- PHP 5.4.4-1~lucid+1
 [2012-08-22 15:54 UTC] chris at c3mdigital dot com
- Debian 6.0.5
- Nginx 1.2.3
- PHP-Fpm 5.4.6
- APC 3.1.12

After upgrading APC and PHP started getting random Nginx 502 bad gateway errors.  
Traced it back to segfault:

php5-fpm[9026]: segfault at 68 ip 00000000006622ce sp 00007fff04952f50 error 4 in 
php5-fpm[400000+762000]
php5-fpm[9060] general protection ip:6622ce sp:7fff04950cf0 error:0 in php5-
fpm[400000+762000]
php5-fpm[9065]: segfault at 19 ip 0000000000496be9 sp 00007fff04954ea0 error 4 in 
php5-fpm[400000+762000]

Reverting to 3.1.9 solves issue.
 [2012-08-23 14:10 UTC] andrei at omr dot odessa dot ua
Can confirm the problem with apc-3.1.12
FreeBSD 9.0-STABLE x86
apache 2.22.22
php 5.4.5
Shortly after apache (re)start httpd's cpu and memory usage goes sky high, webserver becomes irresponsible. Tried different apc settings, no effect. Reverting to 3.1.11 indeed solves the issue.
 [2012-08-25 19:24 UTC] olivier dot brisson at gmail dot com
Same problem for me:
FreeBSD 8.2
PHP 5.4.6
Apache/2.2.22 (FreeBSD)

If i disable APC, no problem is encountered...
 [2012-08-29 12:27 UTC] daniel at produktion203 dot se
Same problem here:

FreeBSD 9.0-RELEASE-p4
PHP-FPM 5.4.6
lighttpd 1.4.31
 [2012-09-02 07:23 UTC] ryan at quizlet dot com
Same problem for us:
SunOS 5.11 (Solaris 11)
PHP 5.4.6
Apache/2.4.3

Reverting back to 3.1.11 solved the issue
 [2012-09-08 15:49 UTC] andrei at omr dot odessa dot ua
Updated to 3.1.13 from FreeBSD ports.
The issue is gone.
 [2012-09-08 17:49 UTC] greenreaper at hotmail dot com
Resolved in 3.1.13.
 [2012-09-08 17:49 UTC] greenreaper at hotmail dot com
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 06:01:32 2024 UTC