apc error - freezes server: [apc-warning] Unable to allocate memory for pool.

Hi, This (error log below) started soon after disabling the php snmp module.. Never occurred prior that i know of. When this happens the server pretty much freezes for http as well as ssh... I have read about adding apc memory but am not sure where / how that would be done without messing up something else...

Something like this from my understanding:?

apc.enabled = 1
apc.shm_size = 100
apc.include_once_override = 1
apc.mmap_file_mask = /tmp/apc.XXXXXX
apc.rfc1867 = 1
apc.include_once_override = 0
[Mon Jan 30 17:34:56 2012] [apc-warning] Unable to allocate memory for pool.
[Mon Jan 30 17:34:56 2012] [apc-warning] Unable to allocate memory for pool.
[Mon Jan 30 17:34:56 2012] [apc-warning] Unable to allocate memory for pool.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool.

[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/edit-comments.php on line 10.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/akismet/akismet.php on line 52.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/custom-contact-forms/custom-contact-forms.php on line 92.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/custom-contact-forms/custom-contact-forms-utils.php on line 22.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 756.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 757.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform_menu.php on line 3.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 758.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 759.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/leads_menu.php on line 2.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 760.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 761.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 762.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 764.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-includes/theme.php on line 1731.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-includes/admin-bar.php on line 25.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/admin.php on line 64.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 10.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 13.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 16.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 19.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 22.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 25.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 28.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 34.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 37.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 40.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 43.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 46.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 47.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 50.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 53.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 56.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/admin.php on line 59.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/admin.php on line 106.
[Mon Jan 30 17:35:11 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/menu.php on line 234.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-content/plugins/group-buying/controllers/groupBuyingController.class.php on line 246.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/includes/list-table.php on line 40.
[Mon Jan 30 17:35:12 2012] [apc-warning] Unable to allocate memory for pool. in /home/ripelocaldeals/public_html/wp-admin/edit-comments.php on line 141.
Status: 
Active

Comments

Howdy -- could you be running low on memory?

What do these commands show:

free -m
dmesg | tail

Also, is this a dedicated server, or a VPS?

low memory? no way.. dedicated server - 24GB RAM Dual Quad core Xeons - w/ only one wordpress based website in development...

[root@host01 ~]# free -m
             total       used       free     shared    buffers     cached
Mem:         24020       4487      19533          0        169       2294
-/+ buffers/cache:       2023      21996
Swap:         2047          0       2047
[root@host01 ~]#


[root@host01 ~]# dmesg | tail
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=58.218.199.147 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=110 ID=256 DF PROTO=TCP SPT=12200 DPT=9000 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=58.218.199.147 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=110 ID=256 DF PROTO=TCP SPT=12200 DPT=2479 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=58.218.199.147 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=110 ID=256 DF PROTO=TCP SPT=12200 DPT=3246 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=58.218.199.147 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=110 ID=256 DF PROTO=TCP SPT=12200 DPT=8090 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *UDP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=61.235.46.146 DST=98.142.218.20 LEN=404 TOS=0x00 PREC=0x00 TTL=112 ID=15863 PROTO=UDP SPT=4267 DPT=1434 LEN=384
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=221.1.220.149 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=111 ID=256 DF PROTO=TCP SPT=12200 DPT=27977 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=221.1.220.149 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=111 ID=256 DF PROTO=TCP SPT=12200 DPT=8085 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=221.1.220.149 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=111 ID=256 DF PROTO=TCP SPT=12200 DPT=8088 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=221.1.220.149 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=111 ID=256 DF PROTO=TCP SPT=12200 DPT=8118 WINDOW=8192 RES=0x00 SYN URGP=0
Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:25:90:63:49:48:00:0b:46:a0:10:00:08:00 SRC=221.1.220.149 DST=98.142.218.20 LEN=40 TOS=0x00 PREC=0x00 TTL=111 ID=256 DF PROTO=TCP SPT=12200 DPT=7212 WINDOW=8192 RES=0x00 SYN URGP=0
[root@host01 ~]#

Okay, it does sound like APC is running out of memory, but there are other causes for that. Three other things to check --

  1. If you go into Administrative Options -> Edit Resource Limits, what is "Maximum size per process" set to? You'd want to make sure that parameter isn't set to something that's interfering with PHP from runing.

  2. You may want to look in $HOME/etc/php.ini, and make sure "memory_limit" is set high enough.

  3. The apc.shm_size parameter in your php.ini file specifies how much memory is going to be allocated to APC. You may need to increase it.

Note though that APC isn't a PHP module that's enabled by default, and enabling it can cause some issues like what you're seeing if the various parameters aren't configured correctly for your system.

You can always disable or remove it until you have everything else on your system working as expected.

There's some additional notes here in this APC bug report from people who ran into similar issues:

https://bugs.php.net/bug.php?id=58982

If so whats the best way to uninstall apc (originally installed w/ yum install php-pecl-apc) Thx!

Well, I'm not familiar with the specifics of getting APC to work with WordPress.

However, if you've tried some of those options above and just aren't getting anywhere -- disabling or removing APC is always an option.

You could use "rpm -e php-pecl-apc` to remove it.

Or to disable it, you can look in /etc/php.d, find the .ini file that is loading the APC extension, and just comment it out.

OK Thanks a lot - i will toy with it a bit but really with the RAM i have i am not sure it is even worth too much effort as the server is for a single site..... i will let you know what i find just for knowledge sake... Thanks again.. ~Scott