[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067689#comment-13067689
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1108:
-----------------------------------------------

@Jon
More test cases are needed, for sure. I actually managed to get near 100% test 
coverage for asynchronous connection pool classes in HttpAsyncClient [1] and 
was going to port those test cases to the synchronous (blocking) implementation 
at some point. Do not worry about the tests for the time being. Eventually all 
low level pooling code should get moved to HttpCore.   

Oleg

[1] 
http://hc.apache.org/httpcomponents-asyncclient-dev/httpasyncclient/clover/org/apache/http/impl/nio/pool/pkg-summary.html

> different connection reuse strategy would reduce number of open connections
> ---------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1108
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1108
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.1.1
>            Reporter: Jon Moore
>            Assignee: Jon Moore
>            Priority: Minor
>             Fix For: 4.1.2
>
>
> Currently, the ThreadSafeClientConnManager reuses persistent connections in a 
> round-robin fashion: when the connection is checked back into the pool, it is 
> added to a queue of available connections for later use. This has the perhaps 
> unintended effect that the client may keep open more connections than needed, 
> because the "last used" time keeps getting updated and none of the 
> connections can get reclaimed via closeIdleConnections().
> Exchanging the queue (FIFO) for a stack (LIFO) would result in extra 
> connections actually becoming idle for long enough to be reclaimed.
> I have a working patch for this; just need to get my act together to get it 
> in.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to