1

I have a Magento site on an nginx server with PHP-fpm. I came into this project recently with the server already set up, albeit poorly. Right now, when a user is in onepage checkout and tries to move from Billing Information to Shipping Information, or directly to Shipping Method, it just redirects him back to the cart. The cart page now has the 'estimate shipping and tax' box open but other than that no change. If you try to checkout again, its the same issue. The only way I was able to resolve the issue was by reloading php-fpm.

In addition to this, I get random 502 errors on my site from different customers. They too only get fixed with a php-fpm reload.

I would like to disable the php-fpm caching as its causing a lot of headaches for our store, but I am not familiar enough with nginx and php-fpm to know where I would go about disabling this to help stop this problem.

4
  • Have you confirmed that your current version of Magento supports the version of PHP that is being used? Apr 8, 2015 at 18:17
  • Good idea, but yes it is CE 1.9.0 and PHP 5.4 Apr 8, 2015 at 18:21
  • If you think a PHP opcache is in use, you will probably have to determine which one before you can disable it. It seems more likely that there are issues with your fastcgi config. You could always try switching over to Apache with mod_php until you sort it out. Apr 8, 2015 at 18:28
  • Are you forcing the USER to https during this process? It could be a config for http vs https Apr 16, 2015 at 17:00

2 Answers 2

1

These are two separate issues and I can't imagine fast CGI caching to have to do with either of them.

Especially since they get fixed with a php-fpm reload. Fast CGI caching errors would get fixed with a reload of nginx.

So you're probably looking at a problem with the opcode cache and this is very likely with 5.4 if the opcache module is enabled, with ion cube being an aggravating factor. I wouldn't run Magento with opcache on anything but 5.5 or higher.

Some info on 502 errors, these are caused by php-fpm abruptly aborting and not telling nginx it's going to quit. These can have a number of causes, but the ones that can be cured with a reload of php-fpm are few.

Corruption of long lived data is one of them, and this the opcode cache case. The other is virtual memory exhaustion which is then reclaimed. This means somebody miscalculated memory use on the server and you'll have to adjust by either upscaling or relocating available resources.

0

This might be a bit of a long shot, but the symtoms which you are describing are suspiciously similar to some problems we recently had with a client. We had been investigating the problem and in the end we eventually discovered that by reconfiguring the nginx server to stop using Keepalive,

(
keepalive_timeout 0;
) 

This meant our configuration worked and problems immediately disappeared, no more restarting php-fpm. So it may be worth giving this a try on your configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.