PHP 5.4 and APC causing Segmentation fault with Magento

PHP 5.4 and APC causing Segmentation fault with Magento

Ron Peled 8:54 pm

At the moment, December 2013, there seems to be a stability issue with PHP latest versions and APC (Alternative PHP Caching) module under Magento. Once you run latest PHP 5.4 with latest APC module and let Magento run or an hour a bunch of errors show up in the apache log files. There seems to be more impact on the checkout process and several admin operations but so far it has been extremely random so we were not able to pinpoint exactly the specific use cases that trigger these errors.

The errors reported in the logs are pretty consistent and show:

The PHP community seems to be eager to try and resolve these issues and get APC to a stable status but it has been taking for far too long. In fact, it seems that Zend have started developing their own OPCache module that may be shipped with PHP beginning with version 5.5. Here is a short article describing how to use the new OPCache module.

But before we go and rush to install an unstable version of PHP and a beta version of OPCache, we confirmed that reverting to an earlier stable release of PHP and APC will work just fine and produce great performance results for Magento: stick to the latest stable PHP 5.3.x and APC version 3.1.9 and you will be safe.

I hope this saves someone some stressful moments.

Related Posts:

Ron Peled

About Ron Peled

Builder of things. Builder of teams. Passion: eCommerce & Marketplaces. Magento expert. CTO Mentor.