Edmund Ham created HTTPCLIENT-2318:
--------------------------------------

             Summary: Implement HttpClientConnectionManager#isShutdown
                 Key: HTTPCLIENT-2318
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2318
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: HttpClient (classic)
            Reporter: Edmund Ham
             Fix For: 4.5.15, 5.3.2


Hi all,

We have an internal library that has core logics and lots of microservices are 
using it. Within the internal library, we have "HttpClientPool" where we are 
caching different HttpClient based on keys and microservices are using them. 
Recently, we've been seeing some of OOM errors on microservices when using 
HttpClients from our "HttpClientPool".

>From https://issues.apache.org/jira/browse/HTTPCLIENT-2039 and 
>https://issues.apache.org/jira/browse/HTTPCLIENT-1924 we understand that it is 
>the intention to shutdown the connection pool in case of Java Errors. I'm now 
>wondering if it's possible to have new API, 
>"HttpClientConnectionManager#isShutdown" so that we as a library can identify 
>if the connection pool is closed or not, before giving out to our clients?

Currently there seems to be no way to identify it, unless we actually try to 
make an outbound call and get "IllegalStateException: Connection pool shut 
down" exception message, which makes impossible for us to do because we as a 
library don't want to make additional HTTP client call every time when our 
client requests for the HttpClient instance.

Thanks!



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

Reply via email to