Varnish timeout after 10 minutes

Rogério Schneider stockrt at gmail.com
Fri Oct 9 16:46:59 CEST 2009


On Fri, Oct 9, 2009 at 11:06 AM, Ketil Froyn <ketil at froyn.name> wrote:
> Thanks. The way I read this option, it is intended to take care of the
> situation where the client isn't receiving data. However, I have
> confirmed that send_timeout was in fact guilty as charged, by setting
> it to 300 seconds and observing that the connection was closed after 5
> minutes instead of 10.

>From trunk:

534 	        { "send_timeout", tweak_timeout, &master.send_timeout, 0, 0,
535 	                "Send timeout for client connections. "
536 	                "If no data has been sent to the client in this
many seconds, "
537 	                "the session is closed.\n"
538 	                "See setsockopt(2) under SO_SNDTIMEO for more
information.",
539 	                DELAYED_EFFECT,
540 	                "600", "seconds" },

Yep, the description SHOULD be fixed some day :)
The thing is, the connection **will be** timeouted "send_timeout"
seconds after it has been set, with or without real network activity.
It is, even if the user is receiving data, the connection will be
closed in "send_timeout" seconds.

From:
SOCKET(7)                  Linux Programmer’s Manual                 SOCKET(7)

       SO_RCVTIMEO and SO_SNDTIMEO
              Specify the receiving or sending  timeouts  until  reporting  an
              error.  The argument is a struct timeval.  If an input or output
              function blocks for this period of time, and data has been  sent
              or  received,  the  return  value  of  that function will be the
              amount of data transferred; if no data has been transferred  and
              the  timeout has been reached then -1 is returned with errno set
              to EAGAIN or EWOULDBLOCK just as if the socket was specified  to
              be  non-blocking.   If  the timeout is set to zero (the default)
              then the operation  will  never  timeout.   Timeouts  only  have
              effect  for system calls that perform socket I/O (e.g., read(2),
              recvmsg(2), send(2), sendmsg(2)); timeouts have  no  effect  for
              select(2), poll(2), epoll_wait(2), etc.

Regards,
-- 
Rogério Schneider

MSN: stockrt at hotmail.com
GTalk: stockrt at gmail.com
Skype: stockrt
http://stockrt.github.com



More information about the varnish-misc mailing list