Alexander Bluhm([email protected]) on 2018.09.26 01:00:17 +0200:
> On Mon, Mar 12, 2018 at 06:42:28PM +0100, Nikola Kolev wrote:
> > [12/Mar/2018:19:16:56 +0100] "<UNKNOWN> " 408 0 server default, client 1 (1 
> > active), 10.0.2.2:56670 -> 10.0.2.15, timeout (408 Request Timeout) ...
> 
> According to a private mail from Nikola, this error message is
> caused by the httpd request timeout configuration.  Our default is
> 60 seconds while Firefox uses 115 seconds.
> 
> about:config network.http.keep-alive.timeout 115
> 
> So I think we should increase httpd's default to 120 seconds.  Then
> Firefox closes the persistent connection first and we don't get
> this ugly error messages.
> 
> ok?

Sorry, but i think sending a 408 is wrong:

The request timeout is the time the server waits for the client to send an
HTTP-Request.

If the server reaches that timeout, it should close the connection, not
generate a 408.

https://tools.ietf.org/html/rfc7230#page-55
6.5.  Failures and Timeouts

Indeed, it seems that only httpd sends a 408 in this case, all other servers
i tested just close the connection.

Same if its waiting for more requests in the keep-alive case.

/Benno

> 
> bluhm
> 
> Index: usr.sbin/httpd/httpd.conf.5
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/httpd/httpd.conf.5,v
> retrieving revision 1.101
> diff -u -p -r1.101 httpd.conf.5
> --- usr.sbin/httpd/httpd.conf.5       20 Jun 2018 16:43:05 -0000      1.101
> +++ usr.sbin/httpd/httpd.conf.5       25 Sep 2018 22:40:19 -0000
> @@ -247,7 +247,7 @@ The default maximum number of requests p
>  .It Ic request timeout Ar seconds
>  Specify the inactivity timeout for HTTP operations between client and server,
>  for example the maximum time to wait for a request from the client.
> -The default timeout is 60 seconds (1 minute).
> +The default timeout is 120 seconds (2 minutes).
>  The maximum is 2147483647 seconds (68 years).
>  .It Ic timeout Ar seconds
>  Specify the inactivity timeout in seconds for accepted sessions,
> Index: usr.sbin/httpd/httpd.h
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/httpd/httpd.h,v
> retrieving revision 1.140
> diff -u -p -r1.140 httpd.h
> --- usr.sbin/httpd/httpd.h    9 Sep 2018 21:06:51 -0000       1.140
> +++ usr.sbin/httpd/httpd.h    25 Sep 2018 22:40:10 -0000
> @@ -68,7 +68,7 @@
>  
>  #define SERVER_MAX_CLIENTS   1024
>  #define SERVER_TIMEOUT               600
> -#define SERVER_REQUESTTIMEOUT        60
> +#define SERVER_REQUESTTIMEOUT        120
>  #define SERVER_CACHESIZE     -1      /* use default size */
>  #define SERVER_NUMPROC               3
>  #define SERVER_MAXHEADERLENGTH       8192
> 

Reply via email to