On Wed, 2010-04-21 at 16:32 -0400, Brooks, Kenneth S wrote:
> We are facing an issue where a connection to a server is made, the request is 
> sent, the server sends the response and the client never sees the request.
> Ultimately we get a socket timeout because httpclient eventually gives up on 
> that request.
> 
> The big problem we have is that this only happens about once every couple of 
> million requests over a 12 hour period (and not consistently).
> 
> What we would like to do is increase the connection timeout to something 
> ridiculously long and put some sort of a watcher thread on the client side 
> that can sort of do what the IdleConnectionTimeoutThread is doing.
> But instead of just calling the 
> connectionManager.closeIdleConnections(connectionTimeout); we would like to 
> interrogate each open connection to see how  long it has been active.
> If it has been active for longer than our idleconnection timeout (currently 
> 20 seconds) then we can perform some action..
> So lets say that if it was active for 1 minute then we would be able to know 
> the issue is happening and do something (like take thread dumps).
> 
> Without doing that, we only know about the problem *after* it has happened 
> and the socket timeout has already been thrown..
> 
> That does me no good.. I want to see inside of the VM *as* its happening.
> 
> Any thoughts on how to do this?
> 

Kenneth,

What version of HttpClient are you using?

This is certainly doable (especially with HttpClient 4.0) but most
likely would require a custom connection manager. JMX enabled version of
the pooling connection manager would probably be the most sensible
thing.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to