News for hackers. Stuff that matters.
Re:The curious case of slow downloads by Dylan16807 on Wednesday May 04, 2016 @09:07AM (#11628013)
What? They wanted a timeout on how long it takes X bytes to send on an active TCP connection. That has nothing to do with poll/select timeouts.
Re:The curious case of slow downloads by masklinn on Wednesday May 04, 2016 @09:31AM (#11628161)
> What? They wanted a timeout on how long it takes X bytes to send on an active TCP connection. That has nothing to do with poll/select timeouts.

nginx called send(file), then polled the socket for write with the timeout, closing the connection if the timeout was hit. It has everything to do with poll/select timeouts, and especially with Linux letting poll hit timeouts when waiting on effectively writable sockets.

Re:The curious case of slow downloads by Dylan16807 on Wednesday May 04, 2016 @09:44AM (#11628253)
> writable sockets

The goal of NGINX here is not to measure whether a socket can consume any data whatsoever. A connection that consumes 1 byte every 15 seconds is still considered stalled, and should be killed. Using the time between sendfile invocations is not the goal, it's a means toward implementing a minimum rate, and they implemented a minimum rate the wrong way. It's an X Y problem and that's not the kernel's fault.