Call-back icon  Enterprise Sales: +1.310.775.2674 (N. America)   +44 20.3286.4137 (UK)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Using APC - blank page issues - Segmentation fault
 
srinigenie
Guru
 
Avatar
Total Posts:  476
Joined:  2008-02-04
 

Hi all,

With so much being talked about APC improving the site performance, I decided to give it a try. And was a bit disappointed to note that the UI all of a sudden give a blank page - ex. once the user clicks on Add to Cart, the page turns blank!!!

Was worried and took me some time to realize that it was APC that was causing this issue!!! Read a bit more and found this article which confirmed my hunch. APC is prone to Segmentation fault errors that result in blank pages

OP Code Caches

Wonder why this is being recommended when this kind of a problem exists or is there a workaround to this segmentation faults?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

We have not experienced segmentation faults with APC on linux platforms.

There were few under Windows server though, and i think it was covered in one of the board posts or wiki articles.

Our choice of APC over eAccelerator is because eAccelerator had problems handling exceptions in PHP5 during out tests.

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
srinigenie
Guru
 
Avatar
Total Posts:  476
Joined:  2008-02-04
 

Thanks Moshe for replying. I am on apache 2.x. A CentOS5 and I face this issue ...is there any workaround? Which linux was APC tested upon in your case?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Sr. Member
 
Avatar
Total Posts:  264
Joined:  2007-11-08
Phoenix, AZ
 
srinigenie - 12 May 2008 11:24 AM

Thanks Moshe for replying. I am on apache 2.x. A CentOS5 and I face this issue ...is there any workaround? Which linux was APC tested upon in your case?

Hello,

There are known compatibility issues with APC & Zend Optimizer 3.x - The end result is exactly as you have described.

You will get better performance by using eAccellerator as well.

Hope this helps some.

 Signature 

Crucial Web Hosting
Magento hosting in shared, semi-dedicated, and dedicated configurations.
See our demo store. The latest Crucial information - Follow us on Twitter!

 
Magento Community Magento Community
Magento Community
Magento Community
 
srinigenie
Guru
 
Avatar
Total Posts:  476
Joined:  2008-02-04
 

How about XCache? I read a lot of good things about XCache as well.. ... does Magento require some code that needs to help in caching? Does this mean Magento can be cached with APC only? Wonder why as the op-code cache mechanisms should be able to cache any PHP script for that matter!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Sr. Member
 
Avatar
Total Posts:  264
Joined:  2007-11-08
Phoenix, AZ
 

Hello,

srinigenie - 12 May 2008 11:59 AM

How about XCache? I read a lot of good things about XCache as well

I dont have any direct experience with xcache so I really can’t comment on it - might be worth a try.

does Magento require some code that needs to help in caching?

No, this is done at the server level and controlled by configuration.

Does this mean Magento can be cached with APC only?

No, not at all.  The incompatibility has nothing to do with Magento.  Quite simply put, APC Cache is not compatible with Zend Optimizer.  If you wish to use APC you will need to disable zend optimizer.

Wonder why as the op-code cache mechanisms should be able to cache any PHP script for that matter!!

This is how the op caches work - I am not certain I understand.

Our testing showed no advantage to using APC while having the rather large disadvantage of not being able to support Zend Optimizer for other applications/clients.

 Signature 

Crucial Web Hosting
Magento hosting in shared, semi-dedicated, and dedicated configurations.
See our demo store. The latest Crucial information - Follow us on Twitter!

 
Magento Community Magento Community
Magento Community
Magento Community
 
srinigenie
Guru
 
Avatar
Total Posts:  476
Joined:  2008-02-04
 

thanks Crucial !! One reason why I suspected that Magento code is written for APC is the latest release notes Magento 1.0.19870 (May 8, 2008) - has a line saying
“Fixed APC cache backend”

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Magento Team
 
Total Posts:  785
Joined:  2007-08-31
 
srinigenie - 12 May 2008 06:27 PM

One reason why I suspected that Magento code is written for APC is the latest release notes Magento 1.0.19870 (May 8, 2008) - has a line saying
“Fixed APC cache backend”

Actually these are two different things. First is PHP code (bytecode) caching, and the second is caching data in Magento.

You can use any bytecode caching solution (APC, eAccelerator, xCache, ZendPlatform/ZendOptimizer), if it works ok for you. We tested Magento only under APC and eAccelerator. The last had some issues with exception handling in PHP5 that time, but it might be already fixed.

Magento data caching can be implemented with a few backends at the moment:
- filesystem cache (by default)
- using filesystem cache on in-memory filesystems (tmpfs, etc)
- APC
- memcached

Filesystem cache usually shows lower performance, but it can work in any environment and it doesn’t require you to install any additional software or to have any specific knowledge on server configuration.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2009 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
108761 users|378 users currently online|199865 forum posts