[ https://issues.apache.org/jira/browse/HTTPCLIENT-2298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768360#comment-17768360 ]
Oleg Kalnichevski commented on HTTPCLIENT-2298: ----------------------------------------------- [~kristijanpostolov] I am very tempted to close this issue as WONTFIX because it is basically a non-issue. Anyway, please provide the exact exception stack trace you are getting in case of a connection request timeout. I will take one more look at it. Oleg > Requests reported as pending longer than expected > ------------------------------------------------- > > Key: HTTPCLIENT-2298 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2298 > Project: HttpComponents HttpClient > Issue Type: Bug > Affects Versions: 5.2.1 > Reporter: Kristijan Postolov > Priority: Minor > > I was upgrading to the new httpclient5 (more specifically 5.2.1) and noticed > an issue where the StrictConnPool does not return accurate stats for the > number of pending request. > > I created an httpClient with connectionRequestTimeout=2000 (2 seconds), > responseTimeout=12000 (12s) and maxConnTotal=1 on the > poolingHttpClientConnectionManager. > The connection request timeout works as expected, when I make a slow request > that runs for 10 seconds, and in the meantime I start a second one, the > second request will fail after 2 seconds, as there is no available connection. > > However, after the 2 seconds, when the second connection throws a timeout > exception I check the > poolingHttpClientConnectionManager.getTotalStats().getPending(), > I am still receiving 1 (meaning there is one request that is waiting for a > free connection), even though this is not true since the request timed out > after the configured 2 seconds. > This number gets back to 0, only when the first connection is released (the > first 10 second request finishes). I checked the same behavior with the old > client (httpclient 4.5.14) and there the pending requests was decremented > right after the connection request timeout is reached. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org