HTTP downloads randomly get stuck until client timeout
mdounin at mdounin.ru
Tue Jan 31 15:32:18 UTC 2017
On Tue, Jan 31, 2017 at 04:19:59PM +0100, Richard Stanway wrote:
> Hi all,
> I'm experiencing odd behavior with some larger HTTP file downloads from my
> site. The files will download for a seemingly random amount of bytes then
> the connection freezes until "send_timeout" expires, at which point the
> error log shows "client timed out (110: Connection timed out) while sending
> response to client".
> A tcpdump shows both ends successfully passing packets with no packet loss.
> nginx is pretty stock from the nginx.org repository, no 3rd party modules
> or complex options, mostly static files and fastcgi / PHP. The behavior is
> very intermittent, but happens regardless of client browser / IP /
> requested file.
> I was able to captured a debug log when this happened, it is available at
> https://hastebin.com/tevusuhobe.m (some rewrite details and variables have
> been omitted)
> sendfile, tcp_nopush, tcp_nodelay are enabled.
> accept_mutex, aio is disabled.
> Linux karak 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19)
> x86_64 GNU/Linux
> I've also tried mainline nginx/1.11.9 from the nginx.org repository and the
> problem persisted. Any advice on what I should be looking at to resolve
> this would be very welcome!
This sounds similar to https://trac.nginx.org/nginx/ticket/1174
(though the kernel looks old enough, but there may by backports).
Are you using timer_resolution?
More information about the nginx