I just upgraded 7.4 ->7.7 and I'm now getting loads of warnings such as:

Warning: require_once(): Unable to allocate memory for pool. in module_load_include() (line 302 of /var/www/drupal/drupal-7.7/includes/module.inc).
Warning: include_once(): Unable to allocate memory for pool. in drupal_load() (line 911 of /var/www/drupal/drupal-7.7/includes/bootstrap.inc).
Warning: include(): Unable to allocate memory for pool. in page_title_init() (line 618 of /var/www/drupal/drupal-7.7/sites/all/modules/page_title/page_title.module).

Each seems to happen multiple times and it's happening on all my sites so it's not theme dependant. I wasn't getting them with 7.4.

Any ideas?

I have already run the update script and flushed the caches (multiple times).

Comments

T-34’s picture

it is APC bug: http://drupal.org/node/1154448
solution: http://groups.drupal.org/node/39364

try edit your apc.ini:
apc.shm_size="64"

I helped this way

mikeryan’s picture

Depending on your version/build of PHP, you may find the APC settings in php.ini instead, and you may need to use an M suffix:

apc.shm_size=64M

If the existing value has the M, keep it...

alltooeasy’s picture

Was banging my head up against this for a bit.
New to APC and just started developing with it instead of normal caching via the Aquia Dev Desktop. Already impressed.

The DCon Lon. talk on this made me a convert! Thanks for the assistance!
All starting to make a bit more sense!

Cheers. If your in Munich 2012, find me for a beer!

alltooeasy’s picture

Find me for a Beer, a Free Beer!
Cheers.

:p

Also i found that 256m ram on APC and lots of problems go away.

Anonymous’s picture

I'd like to weigh in here.

There is no best memory size for APC shm_size, you need to check how the cache size is growing on your server and adjust it accordingly. If the cache hit rate is anything below 99%, you probably need to increase the cache size.

The http://drupal.org/project/prod_check module has tools for automating that task, e.g you can get nagios alarms if you cache size drops below a certrain threshold. It also has a reports page that shows you a piechart of the current free APC memory to manual check the size.

eckersley’s picture

I restarted my server (in this instance, Acquia Dev Desktop) and the problem vanished.

ajagadees’s picture

Restarted the Apache server, the error was gone :)

kurkuma’s picture

Being an APC problems, the cache is cleared when Apache is restarted. The problems should be back after some time.

kenorb’s picture

Check if you're out of memory (top command). Also check if you're using swap file.

bdupls’s picture

I stopped and started Acquia Dev Desktop and the fault disappeared.

Great job!

fegade_ravindra’s picture

just write the below line in your .htaccess file
php_flag apc.cache_by_default Off

hmalaboosi’s picture

Thankssssssss rrfegade, you are great

Gyver06’s picture

I am having this same problem but I am not running APC at all.
I wonder why you all suggest it is coming from APC ?
This seems not to be true since I and some other users have not APC installed. We still face the same error.
Since APC is not the only culprit, is there another way to solve the problem ?
Thanks all for your involvement in drupal resolution problems.
I am running the latest version of drupal, 7.31.

roynilanjan’s picture

Yes in my case this is a memory issue with APC, but still I have found any certain
value... once I have changed the apc.shm_size=100M from default 64M

anayat’s picture

Open the php.ini file on your server and increase the memory_limit and then restart the apache server. using the following command
service httpd restart
or
service apache2 restart

Dharmendra.s’s picture

Thanks Anayat !

dheeraj.mishra’s picture

It's working fine.

Thanks Anayat Sir,