You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Tom Gilbert <to...@linuxbrit.co.uk> on 2001/11/08 23:51:43 UTC

[PATCH] ReadRequestTimeout directive, against 2.0 this time

Rewritten for 2.0, even smaller patch this time, but for me and several
others this directive would be really, really useful.

CVS diff attached as of Thu Nov 8 22:51:21 GMT 2001.

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source/UNIX consultant  | tom@linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'

Re: dependencies (was Re: [PATCH] ReadRequestTimeout directive, against 2.0 this time)

Posted by Tom Gilbert <to...@linuxbrit.co.uk>.
* Cliff Woolley (cliffwoolley@yahoo.com) wrote:
> On Thu, 8 Nov 2001, Tom Gilbert wrote:
> 
> > Oh and I should mention, I came across a shortage of dependancies on
> > httpd.h in the build config. When I changed the size of the server
> > struct and hit make, I got all _kinds_ of fruity bugs until I did a make
> > clean and make again :)
> 
> The dependencies are not stored in CVS, but you should be able to run make
> depend and get them set up.  If you don't run make depend, it's assumed
> you're not going to go changing header files.  :)

Oh. My bad then :) Apologies.

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source/UNIX consultant  | tom@linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'

Re: dependencies (was Re: [PATCH] ReadRequestTimeout directive, against 2.0 this time)

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 8 Nov 2001, Tom Gilbert wrote:

> Oh and I should mention, I came across a shortage of dependancies on
> httpd.h in the build config. When I changed the size of the server
> struct and hit make, I got all _kinds_ of fruity bugs until I did a make
> clean and make again :)

The dependencies are not stored in CVS, but you should be able to run make
depend and get them set up.  If you don't run make depend, it's assumed
you're not going to go changing header files.  :)

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: [PATCH] ReadRequestTimeout directive, against 2.0 this time

Posted by Tom Gilbert <to...@linuxbrit.co.uk>.
* Tom Gilbert (tom@linuxbrit.co.uk) wrote:
> Rewritten for 2.0, even smaller patch this time, but for me and several
> others this directive would be really, really useful.

Oh and I should mention, I came across a shortage of dependancies on
httpd.h in the build config. When I changed the size of the server
struct and hit make, I got all _kinds_ of fruity bugs until I did a make
clean and make again :)

Oh and also, apache doesn't seem to be logging timeouts any more. I
don't see a single 408 in my logs after all this testing... I could
look into that if it's not meant to be the case..

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source/UNIX consultant  | tom@linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'

Re: Is 2.0 out?

Posted by Brian Pane <bp...@pacbell.net>.
Daniel Stone wrote:

>On Sat, Nov 10, 2001 at 11:27:32AM -0600, jlwpc1 wrote:
>
>>"Covalent Technologies decides version 
>>2.0 is ready for prime time and sets the 
>>release of the long-awaited server software 
>>ahead of software from the larger Apache 
>>project itself." 
>>
>
>Covalent are not the Apache Software Foundation and don't speak for
>them. They have a history of heavily modifying Apache, and then calling
>it such, when it shouldn't be. So the short answer is no. They're out to
>make a buck, not push a good product out.
>

IMHO, the quotes in that article suggest that Covalent is
making a specific effort in their public communications
to emphasize the difference between their product and
Apache, and difference between their product launch and
Apache 2.0 GA.  The subtleties of this distinction are
often not obvious to people unfamiliar with open source
in general or Apache in particular, so I'm happy to see
a vendor taking the time to try to make sure that
journalists get an accurate picture of the relationship
between their product and the open-source project on
which it's based.

--Brian




Re: Is 2.0 out?

Posted by Daniel Stone <da...@sfarc.net>.
On Sat, Nov 10, 2001 at 11:27:32AM -0600, jlwpc1 wrote:
> "Covalent Technologies decides version 
> 2.0 is ready for prime time and sets the 
> release of the long-awaited server software 
> ahead of software from the larger Apache 
> project itself." 

Covalent are not the Apache Software Foundation and don't speak for
them. They have a history of heavily modifying Apache, and then calling
it such, when it shouldn't be. So the short answer is no. They're out to
make a buck, not push a good product out.

-- 
Daniel Stone						    <da...@sfarc.net>
<dark> "Let's form the Linux Standard Linux Standardization
        Association Board. The purpose of this board will be to
        standardize Linux Standardization Organizations."

Is 2.0 out?

Posted by jlwpc1 <jl...@mail.earthlink.net>.
"Covalent Technologies decides version 
2.0 is ready for prime time and sets the 
release of the long-awaited server software 
ahead of software from the larger Apache 
project itself." 

http://news.cnet.com/news/0-1003-200-7832173.html?tag=mn_hd 

JLW







Re: [PATCH] ReadRequestTimeout directive, against 2.0 this time

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
> > Rewritten for 2.0, even smaller patch this time, but for me and several
> > others this directive would be really, really useful.
> > 
> > CVS diff attached as of Thu Nov 8 22:51:21 GMT 2001.
> > 
> > Tom.
> 
> can anyone see any problems with this?
> I want to do something similiar to this on the proxy side so that
> differing proxyPass'es can have different timeouts.

It looks fine to me, though I haven't had time to compile it yet.
My only question is whether we should bite the bullet now and define
all of those variables at once:

   timeout_request_wait       # server wait time for first request line
   timeout_request_keepalive  # server wait time for later request lines
   timeout_request_read       # server max time between reads after req_line
   timeout_request_forward    # gateway/proxy write inbound
   timeout_response_wait      # gateway/proxy wait for inbound response
   timeout_response_read      # gateway/proxy max time between inbound reads
   timeout_response_write     # server write outbound

and maybe just use one Timeout (take 2) config directive for all of them.
*shrug*

....Roy


Re: [PATCH] ReadRequestTimeout directive, against 2.0 this time

Posted by Ian Holsman <ia...@cnet.com>.
On Thu, 08 Nov 2001 14:55:58 -0800, Tom Gilbert wrote:


> --OXfL5xGRrasGEqWY
> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline
> 
> Rewritten for 2.0, even smaller patch this time, but for me and several
> others this directive would be really, really useful.
> 
> CVS diff attached as of Thu Nov 8 22:51:21 GMT 2001.
> 
> Tom.

can anyone see any problems with this?
I want to do something similiar to this on the proxy side so that
differing proxyPass'es can have different timeouts.

.Ian

Index: include/httpd.h
===================================================================
RCS file: /home/cvspublic/httpd-2.0/include/httpd.h,v
retrieving revision 1.168
diff -u -r1.168 httpd.h
--- include/httpd.h	2001/10/23 17:26:57	1.168
+++ include/httpd.h	2001/11/08 22:36:37
@@ -1033,6 +1033,8 @@
     server_addr_rec *addrs;
     /** Timeout, in seconds, before we give up */
     int timeout;
+    /** Timeout, in seconds, before we give up on reading a request */
+    int read_request_timeout;
     /** Seconds we'll wait for another request */
     int keep_alive_timeout;
     /** Maximum requests per connection */
Index: server/config.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/config.c,v
retrieving revision 1.136
diff -u -r1.136 config.c
--- server/config.c	2001/10/07 04:54:53	1.136
+++ server/config.c	2001/11/08 22:36:39
@@ -1558,6 +1558,7 @@
     s->server_hostname = NULL;
     s->error_fname = NULL;
     s->timeout = 0;
+    s->read_request_timeout = 0;
     s->keep_alive_timeout = 0;
     s->keep_alive = -1;
     s->keep_alive_max = -1;
@@ -1601,6 +1602,9 @@
 
 	if (virt->timeout == 0)
 	    virt->timeout = main_server->timeout;
+  
+	if (virt->read_request_timeout == 0)
+	    virt->read_request_timeout = main_server->read_request_timeout;
 
 	if (virt->keep_alive_timeout == 0)
 	    virt->keep_alive_timeout = main_server->keep_alive_timeout;
@@ -1645,6 +1649,7 @@
     s->limit_req_fieldsize = DEFAULT_LIMIT_REQUEST_FIELDSIZE;
     s->limit_req_fields = DEFAULT_LIMIT_REQUEST_FIELDS;
     s->timeout = DEFAULT_TIMEOUT;     
+    s->read_request_timeout = DEFAULT_TIMEOUT;     
     s->keep_alive_timeout = DEFAULT_KEEPALIVE_TIMEOUT;
     s->keep_alive_max = DEFAULT_KEEPALIVE;
     s->keep_alive = 1;
Index: server/core.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/core.c,v
retrieving revision 1.88
diff -u -r1.88 core.c
--- server/core.c	2001/11/08 14:29:36	1.88
+++ server/core.c	2001/11/08 22:36:43
@@ -1712,6 +1712,17 @@
     return NULL;
 }
 
+static const char *set_read_request_timeout(cmd_parms *cmd, void *dummy, const char *arg)
+{
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    if (err != NULL) {
+        return err;
+    }
+
+    cmd->server->read_request_timeout = atoi(arg);
+    return NULL;
+}
+
 static const char *set_idcheck(cmd_parms *cmd, void *d_, int arg) 
 {
     core_dir_config *d=d_;
@@ -2577,6 +2588,8 @@
 AP_INIT_TAKE1("AcceptMutex", ap_mpm_set_accept_lock_mech, NULL, RSRC_CONF, \
 	      "The system mutex implementation to use for the accept mutex"),
 #endif
+AP_INIT_TAKE1("ReadRequestTimeout", set_read_request_timeout, NULL, RSRC_CONF,
+  "Read request timeout duration (sec)"),
 { NULL }
 };
 
Index: server/protocol.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/protocol.c,v
retrieving revision 1.51
diff -u -r1.51 protocol.c
--- server/protocol.c	2001/11/07 05:41:22	1.51
+++ server/protocol.c	2001/11/08 22:36:44
@@ -585,8 +585,8 @@
     apr_setsocketopt(conn->client_socket, APR_SO_TIMEOUT, 
                      (int)(keptalive
                      ? r->server->keep_alive_timeout * APR_USEC_PER_SEC
-                     : r->server->timeout * APR_USEC_PER_SEC));
-                     
+                     : r->server->read_request_timeout * APR_USEC_PER_SEC));
+
     /* Get the request... */
     if (!read_request_line(r)) {
         if (r->status == HTTP_REQUEST_URI_TOO_LARGE) {

--OXfL5xGRrasGEqWY--