I wanted to verify some behavior I'm seeing with HttpClient 4.0

I occasionally get a ConnectionPoolTimeoutException, even when I've got spare connections in my ThreadSafeClientConnManager pool.

Looking at the ConnPoolByRoute.getEntryBlocking() code, it appears this could happen if I'm exceeding the max connections per host limit.

I'm only making one simultaneous request per unique host, but looking at DefaultRequestDirector.handleResponse() I see the HttpRoute getting recalculated when there's a redirect.

So this implies that I really have no way to protect against this situation, as I don't know about the redirects until I'm making the requests.

If this is true, then I'll need to add some higher level error processing code to avoid treating this as an unexpected (bail out) error.

I can of course bump the default max number of connections per host, though that would only mask the problem.

Thanks,

-- Ken

--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g





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

Reply via email to