hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neeme Praks (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1396) PoolingClientConnectionManager seems to create one connection too many?
Date Mon, 09 Sep 2013 14:31:56 GMT
Neeme Praks created HTTPCLIENT-1396:

             Summary: 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

See attached Junit test.
You'll also need Jetty dependency:

What the test does:
* sets up a HTTP server (Jetty) with N number of threads processing requests (MAX_CONNECTIONS
* 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

View raw message