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

Hanging request execution when PoolingHttpClientConnectionManager has 0 MaxTotal connections set

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3.2
    • 4.4 Alpha1
    • HttpClient (classic)
    • None

    Description

      By mistake, I intialized a PoolingHttpClientConnectionManager with MaxTotal and DefaultMaxPerRoute as 0. When making trying to execute an HttpGet, the request would sit there hung. Turns out, way down in AbstractConnPool, it performs some checks so that if the pool is exhausted, it will queue up this request for a connection, then blocks the current thread (unless there is a timeout given) indefinitely.

      Perhaps throw an error when creating a Connection Pool if either MaxTotal or DefaultMaxPerRoute are <= 0 in order to ensure that accidentally setting bad values such as those will be obvious.

      Attachments

        Activity

          People

            Unassigned Unassigned
            drizzt321 Aaron Baff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: