APC (php-pecl-apc) causing problems

Support/Development for PHP
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

APC (php-pecl-apc) causing problems

Unread post 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.
Lemonbit Internet Dedicated Server Management
BerArt
Forum Regular
Forum Regular
Posts: 478
Joined: Tue Jan 15, 2008 3:57 am
Location: Netherlands

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

Unread post 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
best regards,

http://hosting.ber-art.nl
Professional Secure Linux Plesk Hosting
hostingguy
Forum Regular
Forum Regular
Posts: 661
Joined: Mon Oct 29, 2007 6:51 pm

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

Unread post 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
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

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

Unread post 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.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

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

Unread post 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.
Lemonbit Internet Dedicated Server Management
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

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

Unread post by faris »

1.6Gb? Eeek! Yes. I see. heheh.

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

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

Unread post 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?
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

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

Unread post 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.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

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

Unread post by breun »

Is your php-pecl-apc package the same the one in EPEL? Looks like you took EPEL's spec file?
Lemonbit Internet Dedicated Server Management
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

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

Unread post 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.
Lemonbit Internet Dedicated Server Management
Post Reply