You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Qingshan Xie <xi...@yahoo.com> on 2009/08/19 20:48:07 UTC

[users@httpd] ProxyTimeout

Hello, 

  In a Reverse Proxy server, what is the relation of Apache "TimeOut" and "ProxyTimeout"?  Can someone shed some lights on it?

Thx, Q.Xie


      

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by Eric Covener <co...@gmail.com>.
On Wed, Aug 19, 2009 at 4:14 PM, Qingshan Xie<xi...@yahoo.com> wrote:
> Thanks for your quick reply.
>
> I am wondering what will happen in the case below,
>
>           Timeout             ProxyTimout
> browser <===========> proxy <===============> backend
>
>  Timeout = 300 sec and ProxyTimeout = 600 sec,
>
> If backend process longer than 5 min, what will happen?
> From the observation of my server,  the whole HTTP session won't be terminated till 10 min.  I am not sure why since the front connection should be terminated in 5 min?

Timeouts only apply while Apache is waiting for something to happen.
Apache isn't waiting on anything from the browser, so there's no 5min
timeout in effect.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by Torsten Foertsch <to...@gmx.net>.
On Wed 19 Aug 2009, Qingshan Xie wrote:
> Think I may not describe my question clearly.  My question is, in the
> case of Timeout=5 min but ProxyTimeout=10 min in a Reverse Proxy
> Server, if the backend response is over 10 min, when the connection
> will be closed, 5 min or 10 min?

The manual at http://httpd.apache.org/docs/2.2/mod/core.html#timeout 
answers your question very clearly. Timeout applies to single IO 
operations.

Torsten

-- 
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by Eric Covener <co...@gmail.com>.
On Wed, Aug 19, 2009 at 5:55 PM, Qingshan Xie<xi...@yahoo.com> wrote:
> Thanks guys for your help.
>
> Think I may not describe my question clearly.  My question is, in the case of Timeout=5 min but ProxyTimeout=10 min in a Reverse Proxy Server, if the backend response is over 10 min, when the connection will be closed, 5 min or 10 min?

The timeouts apply to single network operation, there is no end-to-end
timer running.

If Apache has to wait 10 minutes for a single read from the origin
server to complete, it will timeout.  An error response will be sent
to the client, if he hasn't closed his own end of the connection by
then.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by Qingshan Xie <xi...@yahoo.com>.
Thanks guys for your help.

Think I may not describe my question clearly.  My question is, in the case of Timeout=5 min but ProxyTimeout=10 min in a Reverse Proxy Server, if the backend response is over 10 min, when the connection will be closed, 5 min or 10 min?

Thanks again.
Q.Xie



----- Original Message ----
From: André Warnier <aw...@ice-sa.com>
To: users@httpd.apache.org
Sent: Wednesday, August 19, 2009 2:00:26 PM
Subject: Re: [users@httpd] ProxyTimeout

Qingshan Xie wrote:
> Thanks for your quick reply. 
> I am wondering what will happen in the case below, 
>            Timeout             ProxyTimout
> browser <===========> proxy <===============> backend
> 
>  Timeout = 300 sec and ProxyTimeout = 600 sec, 
> If backend process longer than 5 min, what will happen?  
>> From the observation of my server,  the whole HTTP session won't be terminated till 10 min.  I am not sure why since the front connection should be terminated in 5 min?  
> 
I am not entirely sure, since I have not examined the Apache code itself, but in my understanding, the "Timeout" parameter, precisely and only, applies when Apache is waiting for something from the browser, and the browser is not sending it.
For example :
- the browser creates a TCP connection to the Apache server, on port 80.
- Apache accepts this TCP connection
- Apache now waits for the browser to send a request over that connection
- the browser, for whatever reason, is not sending the request (or not a complete request), within "Timeout" seconds

Then the Timeout applies.  Apache will close the connection, because it is not getting the expected request over that connection.
This avoids a kind of DOS attack, whereby clients could open many connections to Apache, then not send any request, blocking Apache forever.

So it does /not/ apply when it is Apache that should send something to the browser, and does not send it.  In that last case, what may happen is that /the browser/ times out, because Apache takes too long to respond.  In my experience, this browser timeout is several minutes (3..5 ?).  I don't know if this timeout is adjustable in the usual browsers.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


      

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by André Warnier <aw...@ice-sa.com>.
Qingshan Xie wrote:
> Thanks for your quick reply. 
> 
> I am wondering what will happen in the case below, 
> 
>            Timeout             ProxyTimout
> browser <===========> proxy <===============> backend
> 
>  Timeout = 300 sec and ProxyTimeout = 600 sec, 
> 
> If backend process longer than 5 min, what will happen?  
>>>From the observation of my server,  the whole HTTP session won't be terminated till 10 min.  I am not sure why since the front connection should be terminated in 5 min?  
> 
I am not entirely sure, since I have not examined the Apache code 
itself, but in my understanding, the "Timeout" parameter, precisely and 
only, applies when Apache is waiting for something from the browser, and 
the browser is not sending it.
For example :
- the browser creates a TCP connection to the Apache server, on port 80.
- Apache accepts this TCP connection
- Apache now waits for the browser to send a request over that connection
- the browser, for whatever reason, is not sending the request (or not a 
complete request), within "Timeout" seconds

Then the Timeout applies.  Apache will close the connection, because it 
is not getting the expected request over that connection.
This avoids a kind of DOS attack, whereby clients could open many 
connections to Apache, then not send any request, blocking Apache forever.

So it does /not/ apply when it is Apache that should send something to 
the browser, and does not send it.  In that last case, what may happen 
is that /the browser/ times out, because Apache takes too long to 
respond.  In my experience, this browser timeout is several minutes 
(3..5 ?).  I don't know if this timeout is adjustable in the usual browsers.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by Qingshan Xie <xi...@yahoo.com>.
Thanks for your quick reply. 

I am wondering what will happen in the case below, 

           Timeout             ProxyTimout
browser <===========> proxy <===============> backend

 Timeout = 300 sec and ProxyTimeout = 600 sec, 

If backend process longer than 5 min, what will happen?  
>From the observation of my server,  the whole HTTP session won't be terminated till 10 min.  I am not sure why since the front connection should be terminated in 5 min?  

Thx, Q.Xie


----- Original Message ----
From: Torsten Foertsch <to...@gmx.net>
To: users@httpd.apache.org
Cc: Qingshan Xie <xi...@yahoo.com>
Sent: Wednesday, August 19, 2009 12:23:29 PM
Subject: Re: [users@httpd] ProxyTimeout

On Wed 19 Aug 2009, Qingshan Xie wrote:
> In a Reverse Proxy server, what is the relation of Apache "TimeOut"
> and "ProxyTimeout"?  Can someone shed some lights on it?

TimeOut aborts a request if the client/browser takes too long to send or 
receive data. ProxyTimeout aborts a connection to the backend if it is 
not responding.

           Timeout             ProxyTimout
browser <===========> proxy <===============> backend

Torsten

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


      

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyTimeout

Posted by Torsten Foertsch <to...@gmx.net>.
On Wed 19 Aug 2009, Qingshan Xie wrote:
> In a Reverse Proxy server, what is the relation of Apache "TimeOut"
> and "ProxyTimeout"?  Can someone shed some lights on it?

TimeOut aborts a request if the client/browser takes too long to send or 
receive data. ProxyTimeout aborts a connection to the backend if it is 
not responding.

           Timeout             ProxyTimout
browser <===========> proxy <===============> backend

Torsten

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org