When dev-lang/php-5.3.3-r1 and dev-php5/pecl-apc-3.1.4[-mmap] are installed and apc.mmap_file_mask is not explicitely set in the .ini-file, output of php scripts include "Unable to allocate memory for pool" warning message. Reproducible: Always Steps to Reproduce: 1. USE="-mmap" emerge -av "=dev-lang/php-5.3.3-r1" "=dev-php5/pecl-apc-3.1.4" 2. check, that /etc/php/apache2-php5/ext-active/apc.ini includes the line ";apc.mmap_file_mask="/tmp/apcphp5.XXXXXX" (commented out!) 3. run an php-skript with lots of "include_once" (e.g. drupal - update.php) Actual Results: Output includes "warning: require_once(): Unable to allocate memory for pool. in <FILENAME> on line <LINE NUMBER WITH require_once()" Expected Results: no warning. should not exluding "mmap" from being build into APC prevent any mmap-related errors from happening? What else is the USE flag for?
Seems to be known (and fixed?) upstream as per URL. The USE flag essentially passes --disable-apc-mmap to configure if you turn it off. So yes, mmap should not be used here. The mmap_file_mask setting is irrelevant if you do this. Can you be more specific about the environment? Like, are you hitting actual RAM limits, do you have selinux enabled (and see something in it's logs)?
Just to give a quick feedback (I hope, I can provide more later on...): I am not hitting physical RAM limits. SELinux is not activated on my machine. It seems like I am seeing the same problem as hanwoody from upstream.
Can you please try to upgrade to 3.1.5 and see if you hit the same issues?
At first sight the error seems to be gone on dev-php5/pecl-apc-3.1.5-r2 with dev-lang/php-5.3.3-r3. But since I was not able to create an always failing test case for the initial problem, this might have been pure luck. On the other hand there has been some changes upstream concerning the same error message, so I would not mind the ticket being closed...