Partial downloads

Maxim Dounin mdounin at mdounin.ru
Sat Feb 18 22:37:17 UTC 2012


Hello!

On Sat, Feb 18, 2012 at 05:13:37PM -0500, Samael wrote:

> Of course - http://pastebin.com/raw.php?i=RnZv58Zq

The log in question suggests there is just normal send_timeout:

...
2012/02/18 22:03:36 [debug] 4368#0: *1 sendfile: @2273599 684918465
2012/02/18 22:03:36 [debug] 4368#0: *1 sendfile: 96360, @2273599 96360:684918465
2012/02/18 22:03:36 [debug] 4368#0: *1 http write filter 0835AC9C
2012/02/18 22:03:36 [debug] 4368#0: *1 http copy filter: -2 "/test/bigfile?"
2012/02/18 22:03:36 [debug] 4368#0: *1 http writer output filter: -2, "/test/bigfile?"
2012/02/18 22:03:36 [debug] 4368#0: *1 event timer: 23, old: 2450531909, new: 2450532133
2012/02/18 22:03:49 [debug] 4368#0: *1 event timer del: 23: 2450531909
2012/02/18 22:03:49 [debug] 4368#0: *1 http run request: "/test/bigfile?"
2012/02/18 22:03:49 [debug] 4368#0: *1 http writer handler: "/test/bigfile?"
2012/02/18 22:03:49 [info] 4368#0: *1 client timed out (110: Connection timed out) while sending response to client, client: 1.1.1.2, server: 1.1.1.1, request: "GET /test/bigfile HTTP/1.1", host: "1.1.1.1", referrer: "http://1.1.1.1/test/"
2012/02/18 22:03:49 [debug] 4368#0: *1 http finalize request: 408, "/test/bigfile?" a:1, c:1
...

Note that nothing happens with the connection in question between 
"22:03:36" and "22:03:49".  Looks ok unless you have additional 
info which suggests that data from socket buffer was sent to 
the client and it's nginx fault it doesn't sent more data.

It's slightly off from expected 10 seconds as per your config part 
you've provided, though this is likely related to the fact that your 
nginx processes are disk-bound and nginx wasn't able to process 
timer in time.  You may want to take a look at sendfile_max_chunk 
directive, see

http://nginx.org/en/docs/http/ngx_http_core_module.html#sendfile_max_chunk

Maxim Dounin



More information about the nginx mailing list