hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1396) PoolingClientConnectionManager seems to create one connection too many?
Date Wed, 11 Sep 2013 08:23:55 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCLIENT-1396.
-------------------------------------------

    Resolution: Not A Problem
    
> PoolingClientConnectionManager seems to create one connection too many?
> -----------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1396
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1396
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.2.5
>         Environment: Any
>            Reporter: Neeme Praks
>            Priority: Minor
>         Attachments: TestPoolingConnManagerWithJetty.java
>
>
> See attached Junit test.
> You'll also need Jetty dependency:
>     <dependency>
>       <groupId>org.mortbay.jetty</groupId>
>       <artifactId>jetty</artifactId>
>       <version>6.1.26</version>
>       <scope>test</scope>
>     </dependency>
> What the test does:
> * sets up a HTTP server (Jetty) with N number of threads processing requests (MAX_CONNECTIONS
constant).
> * sets up HttpClient with same N number of max connections (PoolingClientConnectionManager)
> * sets up X workers, trying to connect to the server at the same time.
> *Expected result*: although throughput is throttled (limited number of threads and connections),
all workers should get successful response.
> *Actual result:* at least one of the workers will get "java.net.SocketTimeoutException:
Read timed out" error.
> *Workaround:* limit HttpClient max connections to MAX_CONNECTIONS-1 and the test will
pass.
> Seems to be some off-by-one bug somewhere in PoolingClientConnectionManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message