logo
Wordpress sometime put into apache logs infor about no memory for apc.

How to solve this?

001. Introduction

In apache logs we can find entries like this one:

[Wed Oct 15 20:51:05 2014] [apc-warning] Unable to allocate memory for pool. in /volume1/web/klasa/wordpress/wp-content/plugins/nextgen-gallery/pope/lib/class.component_registry.php on line 939.

002. Repair

In the php.ini increase memory reserved for APC.

vi /usr/syno/etc/php.ini

[apc]
; APC Setting
; We now set "apc.enabled" in /usr/syno/etc/php/user-setting.ini
; apc.enabled = 1
apc.shm_size = 64
apc.shm_segments = 1
apc.ttl = 300
apc.user_ttl = 300
apc.num_files_hint = 1024
apc.mmap_file_mask = /var/spool/php/apc/apc.XXXXXX

In my case php uses 64 MB so i increased it up to 96 MB.

apc.shm_size = 96

and restart apache process (or reboot server).

If this will be still too low, increase and add more memory (like 128 MB).