502 bad gateway


I have a magento website working fine for months now.
However i recently installed a PDF plugin to send invoices with emails.
The PDF url is giving a 502 bad gateway
I have checked around on the internet and cant find the issue here. no
APC. increased fastcgi buffers doesnt change anything. checked nginx
logs, magento logs and user logs but nothing.

Could anyone point me in the right direction on how to figure this one


On Wed, Dec 09, 2015 at 05:03:56PM +0100, Christ-Jan Wijtmans wrote:

Could anyone point me in the right direction on how to figure this one out?
If 502 is returned by nginx, this means that an error happened
while talking to an upstream server. Details about the error are
expected to be available in the error log at the “error” level. If
you don’t see error in the error log - this means that either
logging isn’t properly configured (or the error was returned by
the upstream server, not by nginx).

Details on how to configure logging can be found here:


This article may be useful as well:


Maxim D.

Hello Maxim,

Thank you for the response. I was assuming the error_log in the block
was properly set up but apparently it was not. I finally got an error
message “2015/12/10 18:02:13 [error] 30341#0: *10 recv() failed (104:
Connection reset by peer) while reading response header from
upstream”. Probably php-fpm related? I will continue to dig around.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs