I keep getting this error message:

Warning: require_once(): Unable to allocate memory for pool. in Database::loadDriverFile() (line 1742 of /home/site/public_html/includes/database/database.inc).

I am not sure what the problem might be. It started when I installed Varnish 3.0; I couldn't get it to work, so I reverted back to my previous configuration with only APC. Now, I keep getting the message, and it is also visible to anonymous users. I have disabled the system help block from all themes, and turned off error reporting, but it still appears.

I also have mod-pagespeed enabled.


2 Answers 2


Seems to definitely be an APC issue, there's a post about it on StackOverflow which links through to a bug report on PHP.net for precisely this issue.

  • hey Clive: I might be being dense, but what is the prescribed solution for Linux boxes? Just to specify one of the mmap solutions above?
    – acouch
    May 24, 2012 at 14:39
  • 1
    @acouch You're not being dense, I linked to that post as a whole but someone else edited these settings into my answer. According to the upvotes on the other answer (not the one that was accepted) in that question setting apc.shm_size=x and apc.ttl=x is what fixes the problem so kudos to you :)
    – Clive
    May 24, 2012 at 14:46

When we've had that same type of warning, increasing the APC memory limit has helped. Try adding

; APC Memory limit size

to the php.ini file and restarting apache. And obviously try increasing if that doesn't solve it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.