fastcgi and X-Accel-Redirect

Jaroslav Gresula jgresula.LEAVE-THIS-OUT at gmail.com
Mon Dec 21 00:41:58 MSK 2009


Jaroslav Gresula wrote:
> I use nginx 8.22 and flup (a fastcgi python server). When I send a file
> using the X-Accel-Redirect header then flup reports "Connection reset by
> peer" error - but nginx still delivers the file.
>
> Sending a file in the response body (i.e. the standard way) works well.
>
> Does anyone have any idea what might be causing that ECONNRESET?
>

Update:

Closer inspection in wireshark shows that nginx sends RST roughly in a
half of cases whereas the other half of connections is closed correctly.

In the successful cases, nginx receives response headers + another 4
packets and then flup is the one who closes the connection.

In the failed cases, nginx sends FIN,ACK followed by RST right after it
receives response headers.

Any ideas why nginx is sending RST?

Thanks,
-- 
Jarda
http://jagpdf.org




More information about the nginx mailing list