Edit report at https://bugs.php.net/bug.php?id=58982&edit=1
ID: 58982 Comment by: FractalizeR at yandex dot ru Reported by: hanno at hboeck dot de Summary: apc produces tons of warnings "Unable to allocate memory for pool." Status: Feedback Type: Bug Package: APC Operating System: Linux PHP Version: 5.2.11 Block user comment: N Private report: N New Comment: I've had this problem on PHP 5.3.8 and APC 3.1.9. Fixed it like xantek proposed. Previous Comments: ------------------------------------------------------------------------ [2011-10-14 11:30:56] xantek dot imc at gmail dot com Had this issue with: APC Version 3.1.9 PHP Version 5.2.17 I found viewing apc.php helpful to visualize config and cache information. It seems this issue is related to configuration and not a software bug. I tweaked the following setting based on details found in this thread, http://www.php.net/manual/en/apc.configuration.php, and usage details in apc.php. apc.mmap_file_mask=/dev/zero apc.shm_size=64M apc.ttl=0 ------------------------------------------------------------------------ [2011-08-06 20:05:44] gop...@php.net Another reason for that error is if apc_bin_* functions are used in apache. Ideally, they're only good for command line apps - because the apc_bin_load() allocations qualify as memory leaks in shared memory, because the entire cache entry set is tied to a single allocation - so even an apc cache clear won't free up memory. That's the only scenario where we probably would spam the log with such warnings consistently - any other scenario will only log it till the cache clears. ------------------------------------------------------------------------ [2011-08-05 16:59:29] ras...@php.net @ondrej Why are you running both eAccelerator and APC? That's not going to work. ------------------------------------------------------------------------ [2011-08-05 10:30:49] ondrej dot hlavacek at keboola dot com PHP 5.3.6 (cli) (built: Mar 19 2011 07:44:03) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans APC 3.1.9 apc.enabled=1 apc.shm_segments=1 apc.shm_size=64M apc.num_files_hint=1024 apc.user_entries_hint=4096 apc.ttl=7200 apc.use_request_time=1 apc.user_ttl=7200 apc.gc_ttl=3600 apc.cache_by_default=1 apc.filters apc.mmap_file_mask=/tmp/apc.XXXXXX apc.file_update_protection=2 apc.enable_cli=0 apc.max_file_size=1M apc.stat=1 apc.stat_ctime=0 apc.canonicalize=0 apc.write_lock=1 apc.report_autofilter=0 apc.rfc1867=1 apc.rfc1867_prefix =upload_ apc.rfc1867_name=APC_UPLOAD_PROGRESS apc.rfc1867_freq=0 apc.rfc1867_ttl=3600 apc.include_once_override=0 apc.lazy_classes=00 apc.lazy_functions=0 apc.coredump_unmap=0 apc.file_md5=0 apc.preload_path Kernel 2.6.21.7-2.fc8xen Server with 5 virtualhosts and max 2 users per virtualhost at once, happens around half an hour after apache reload. ------------------------------------------------------------------------ [2011-07-26 06:59:25] pear dot neufeind at speedpartner dot de We seem to have run into the same problem on one server. Running php 5.3.4 with apc 3.1.9. Unfortunately it only seems to occur after quite some time running with a cache (maybe a day or more) so I don't have an easy testcase to reproduce it directly after apache-restarts. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=58982 -- Edit this bug report at https://bugs.php.net/bug.php?id=58982&edit=1