<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
502 Bad Gateway usually indicates a problem with the application (or
upstream) server. In this case, I think that would be Unicorn.
Double check that Unicorn is configured and running and correctly
and that the port or socket that you have in your nginx config is
the same as the one Unicorn is listening on.<br>
<br>
_Nik<br>
<br>
<div class="moz-cite-prefix">On 2/12/2013 12:16 PM, Raghvendra
Parashar wrote:<br>
</div>
<blockquote
cite="mid:CAOFmwXqP0iRDfpHTY8+hPWjhVLhh2M2jRB1-GJhjwU1Pb-i0Pw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi nginx team,<br>
<br>
</div>
I am getting 502 bad gateway error for particular URL.<br>
<br>
</div>
Application details :<br>
Rails 3.1.0<br>
Ruby 1.9.2<br>
unicorn 4.2.0<br>
resque 1.20.0<br>
nginx/1.0.14<br>
redis 2.4.8<br>
<br>
</div>
nginx error log :<code><span><br>
2013</span><span>/</span><span>02</span><span>/</span><span>12</span><span>
</span><span>07</span><span>:</span><span>36</span><span>:</span><span>16</span><span>
</span><span>[</span><span>error</span><span>]</span><span>
</span><span>32401</span><span>#0: *1948 upstream
prematurely closed connection while reading response
header from upstream</span></code><br>
<br>
</div>
<div>I have also posted my question on stack-overflow, please
find it <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/14825304/502-error-nginx-ruby-on-rails-application"
target="_blank">here</a>, but couldn't got any response.<br>
</div>
<div><br>
</div>
Please guide me to solve this problem.<br>
<br>
</div>
Thanks
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div dir="ltr">Regards:<br>
Raghvendra Kumar Parashar<br>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
</blockquote>
<br>
</body>
</html>