Hello httpclient-users, Beginner httpclient user here and this is more note to self and httpclient users alike. Been hit by http connection pool getting exhausted, randomly, on production... For few days I've been BMHATW, suspected even that it's a bug in httpclient 4.0.x, switched to latest 4.1-beta2-SNAPSHOT which btw works ok for me. With extra logging on client and server side of communication I've found out that delete requests didn't return connection back to the pool. After RTFM on releasing low level resources (see [1]), I've added try-finally around client.execute(httpDelete) and aborting of httpDelete in finally, and ta-da, connections would get returned to the pool.
Regards, Stevo. [1] "1.1.5. Ensuring release of low level resources" http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d4e143 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
