getting intermittent '502 bad gateway ' error.

shobhit nginx-forum at
Sat Aug 2 09:09:54 UTC 2014

We are using nodejs(v 0.10.29 ) ,express,nginx( version 1.4.6) with
mongodb(v 2.6.3) replicaset and getting intermittent 502 bad gateway error.
pm2 logs is unable to log error though nginx aerror.log is showing 

    recv() failed (104: Connection reset by peer) while reading response
header from     upstream, client:, server:,
request: "GET /img/abc.png HTTP/1.1", upstream:
"", host: "", referrer:

and access.log is saying:

    "GET /url/abc.html HTTP/1.1" 502 723 ""
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/33.0.1750.117 Safari/537.36"

can anyone guide me with the issue?

Posted at Nginx Forum:,252227,252227#msg-252227

More information about the nginx mailing list