So, I’m working on a Magento upgrade on a LEMP stack server, and in spite of changing [php]proxy_read_timeout[/php] to 1 hour (3600s), was still giving me the ugly “502 Bad Gateway” message.

Foud that there is a setting in PHP-FPM that should to hand-in-hand with the one in nginx, [php]request_terminate_timeout[/php] to be more specific. Increased that to 3600s in [bash]/etc/php-fpm.d/www.conf[/bash], restarted the fpm service and voila! Works like a charm!

The default is set to 120s, btw.

Hope that helps someone.

//lateredit: There might be another setting [bash]fastcgi_read_timeout[/bash] in your nginx conf file, that one needs to be set to the same value as the previous ones.

By George

Leave a Reply

Your email address will not be published. Required fields are marked *