ngx_http_do_read_client_request_body -- client closed prematurely connection

Brian Moran bmoran at
Sat Jan 16 05:25:50 MSK 2010

on 0.7.64 we're seeing a number of "client closed prematurely 
connection" errors when very large POSTs (multiple megabytes) are being 
done (file uploads).

We've isolated it to ngx_http_do_read_client_request_body, and have 
added output of the size of the 'body rest' -- the body rest has a quite 
large amount of data, we suspect the contents of the post.

Under what circumstances would we receive no bytes back from the recv, 
but rb->rest be very large?

This doesn't occur all of the time, nor with any particular size of POST 

More information about the nginx mailing list