Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-2318

Implement HttpClientConnectionManager#isShutdown

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.4-alpha2
    • HttpClient (classic)
    • None

    Description

      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!

      Attachments

        Activity

          People

            abernal Arturo Bernal
            edmund.ham Edmund Ham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m