Thanks a lot! L. -----Original Message----- From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] Sent: Thursday, June 21, 2007 12:03 To: HttpClient User Discussion Subject: RE: HTTP 1.1 persistence duration
On Thu, 2007-06-21 at 11:58 +0300, Tankelevich Leonid wrote: > Thanks Oleg, > > Do you know how long servers do typically keep the connection alive? > > Thank you, > L. > Apache HTTPD shipped with Ubuntu 7.04 has KeepAliveTimeout set to 15 sec per default. This value may very across distributions, platforms, and HTTP server implementations. # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 Oleg > -----Original Message----- > From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 21, 2007 11:39 > To: HttpClient User Discussion > Subject: Re: HTTP 1.1 persistence duration > > On Thu, 2007-06-21 at 10:18 +0300, Tankelevich Leonid wrote: > > Hello team, > > > > As I understood, physical connection remains open (and may be reused > > for the next request) during some time after response to a HTTP 1.1 > request. > > Is this duration controlled by server or client? > > How may I manage it with HttpClient? > > > > The HTTP spec does not prescribe how long a persistent connection may > be kept alive. Essentially a persistent connection can be closed by > either client or server at any time of their choosing. HttpClient > keeps persistent connections alive infinitely per default. One can > implement a custom connection eviction policy by using > #closeIdleConnections method of the HttpConnectionManager interface. > There is also a utility class called IdleConnectionTimeoutThread [2] > which can be used to start a background thread to periodically invoke > #closeIdleConnections() on connection manager instances registered with the thread. > > Hope this helps > > Oleg > > [1] > http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/common > s/ > httpclient/HttpConnectionManager.html#closeIdleConnections(long) > [2] > http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/common > s/ httpclient/util/IdleConnectionTimeoutThread.html > > > Thanks, > > Leonid Tankelevich > > Comverse Ltd. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
