<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi guys,</div><div><br></div><div>1. I have Nginx proxying upstream to 3 mongrels</div><div><br></div><div>2. A request comes in that has a ridiculous and crazy URL</div><div><br></div><div>3. The url is passed to the mongrels, and each mongrel errors on the request (M<span class="Apple-style-span" style="font-family: Verdana; ">ongrel::HttpParserError: Invalid HTTP format, parsing fails.) </span></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">4. Nginx tries each mongrel in the upstream, gets the same result from each ( <span class="Apple-style-span" style="font-family: Helvetica; "><a href="http://pastie.textmate.org/private/m9xjf7elqtmb2kwdtsbaa">http://pastie.textmate.org/private/m9xjf7elqtmb2kwdtsbaa</a> ) <span class="Apple-style-span" style="font-family: Verdana; ">and passes a 502 to the client.</span></span></font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">5. On the next request, Nginx never tries the upstream. Nginx returns a 502 for this next without checking the upstream. In this case, a real request is lost because (maybe) Nginx thinks that the upstream is invalid. See my strace:</font></div><div><a href="http://pastie.org/private/0ktyhglwvmpwjbocryfysg">http://pastie.org/private/0ktyhglwvmpwjbocryfysg</a> and see the entire sequenced logged <a href="http://pastie.textmate.org/private/za2vqdrbxy8paoqfx1mlmq">http://pastie.textmate.org/private/za2vqdrbxy8paoqfx1mlmq</a></div><div><br></div><div><font class="Apple-style-span" face="Verdana">Is this correct nginx behavior? Is mongrel giving an incorrect response to nginx?</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Thanks for your help,</font></div><div><font class="Apple-style-span" face="Verdana">Sudara</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div></body></html>