<div dir="ltr">Many thanks, works like a charm. The reason is Wrong location settings.<div class="gmail_extra"><div class="gmail_quote"><div><span class=""><br></span></div></div></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Fri, Nov 29, 2013 at 5:02 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<br>
On Fri, Nov 29, 2013 at 04:59:56PM +0400, Maxim Dounin wrote:<br>
<br>
> Hello!<br>
><br>
> On Fri, Nov 29, 2013 at 03:36:18PM +0400, Oleg V. Khrustov wrote:<br>
><br>
> > nginx/1.5.4 doesnt intercept fastcgi errors.<br>
> > location / {<br>
> > ....<br>
> > fastcgi_pass bg;<br>
> > error_page 500 502 503 504 408 404 =204 /204.htm;<br>
> > fastcgi_intercept_errors on;<br>
> ><br>
> > .....<br>
> > }<br>
> ><br>
> > However in root location access log we still see<br>
> ><br>
> > 91.192.148.232 - - [29/Nov/2013:13:39:20 +0400] "POST / HTTP/1.1" 504 182<br>
> > "-" "-" "0.138"<br>
> ><br>
> > And tcpdump capture shows that we still send 504:<br>
> ><br>
> > Py...HTTP/1.1 504 Gateway Time-out<br>
> > Server: nginx/1.5.4<br>
><br>
> [...]<br>
><br>
> > What can be wrong here?<br>
><br>
> Most likely reasons, in no particular order:<br>
><br>
> - You've forgot to reload configuration, or the configuration was<br>
> rejected due to errors and you've missed it.<br>
><br>
> - The request is handled in other location and/or server, not<br>
> the one you are looking at.<br>
<br>
Another possible one, after looking into your next question:<br>
<br>
- You've forgot to add a location to handle /204.htm, and it's<br>
passed to fastcgi backend again, and this again results in 504.<br>
As by default recursive_error_pages is disabled, the error is<br>
returned to a client.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/en/donation.html" target="_blank">http://nginx.org/en/donation.html</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div>