Page 1 of 1

APC (php-pecl-apc) causing problems

Posted: Sun Feb 08, 2009 6:01 am
by breun
We installed the new php-pecl-apc package (APC, the Alternative PHP Cache) which is in the atomic channel now, but we're getting errors like these, but not on all sites:
Allowed memory size of 67108864 bytes exhausted (tried to allocate 1769239654 bytes)
And:
Cannot run code from this file in conjunction with non encoded files in /some/path/to/file
Some sites continue to function after installing APC, others die because of errors like these. Anyone else seeing this? For now I've made sure none of our boxes hace php-pecl-apc installed, but it would be nice to have a PHP opcode cache on them for performance.

Re: APC (php-pecl-apc) causing problems

Posted: Sun Feb 08, 2009 7:08 am
by BerArt
Well, needless to say I have this also on all my ASL servers, OSSEC send me this every minute:
OSSEC HIDS Notification.
2009 Feb 08 10:00:40

Received From: plesk4->/var/log/httpd/error_log
Rule: 30104 fired (level 12) -> "Apache segmentation fault."
Portion of the log(s):

[Sun Feb 08 10:00:38 2009] [notice] child pid 29455 exit signal Segmentation fault (11)
For the rest I have the same problem as "breun" with PHP

Re: APC (php-pecl-apc) causing problems

Posted: Sun Feb 08, 2009 12:37 pm
by hostingguy
I get 70+ segfaults per day like BerArt but I dont have the APC (i use the php-eaccelerator) and dont seem to have the problems breun is having

Re: APC (php-pecl-apc) causing problems

Posted: Sun Feb 08, 2009 12:39 pm
by faris
Allowed memory size of 67108864 bytes exhausted (tried to allocate 1769239654 bytes)
Isn't that kind of error the kind of thing you expect as a result of memory limitations enforced by suhosin? If so then it might be worth looking at your suhosin settings in php.ini.

Faris.

Re: APC (php-pecl-apc) causing problems

Posted: Sun Feb 08, 2009 12:50 pm
by breun
faris wrote:
Allowed memory size of 67108864 bytes exhausted (tried to allocate 1769239654 bytes)
Isn't that kind of error the kind of thing you expect as a result of memory limitations enforced by suhosin? If so then it might be worth looking at your suhosin settings in php.ini.
We're not using suhosin. The memory limit is specified in php.ini and indeed is set to 64 MB on this machine. Apparently the script tries to allocate much more memory (1.6 GB?!) than when APC is not enabled? All problems went away after removing APC.

Re: APC (php-pecl-apc) causing problems

Posted: Sun Feb 08, 2009 1:28 pm
by faris
1.6Gb? Eeek! Yes. I see. heheh.

Faris.

Re: APC (php-pecl-apc) causing problems

Posted: Mon Feb 09, 2009 6:46 am
by breun
Is anyone else successfully using ART's php-pecl-apc package? We also saw Apache segfaulting a lot while APC was installed.

I have done manual installations of APC in the past that didn't cause PHP errors or Apache segfaults, so maybe there is something wrong with the package?

Re: APC (php-pecl-apc) causing problems

Posted: Mon Feb 09, 2009 11:12 am
by scott
http://3es.atomicrocketturtle.com/packa ... l-apc.spec is the spec file if you want to take a crack at it. You're the only one i know thats ever used it, and I cant even run it on the test servers here because of the zend conflict.

Re: APC (php-pecl-apc) causing problems

Posted: Mon Feb 09, 2009 11:42 am
by breun
Is your php-pecl-apc package the same the one in EPEL? Looks like you took EPEL's spec file?

Re: APC (php-pecl-apc) causing problems

Posted: Mon Feb 09, 2009 3:41 pm
by breun
I just did a manual APC install (via pecl) and that gave the same problems. Guess I have to take this up with the APC devs.