[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-commons-dev
Subject:    [jira] [Commented] (HTTPCLIENT-2298) Requests reported as pending longer than expected
From:       "Oleg Kalnichevski (Jira)" <jira () apache ! org>
Date:       2023-09-25 10:59:15
Message-ID: JIRA.13551065.1695038795000.100132.1695639600058 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/HTTPCLIENT-2298?page=com.atlassian.jira.pl \
ugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768634#comment-17768634 \
] 

Oleg Kalnichevski commented on HTTPCLIENT-2298:
-----------------------------------------------

[~kristijanpostolov] Please review / test the proposed fix

[https://github.com/apache/httpcomponents-core/compare/master...HTTPCLIENT-2298]

Please note the fix is in the core, not the client.

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-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic