Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225647

HttpClient throws java.io.IOException: too many concurrent streams

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux

      Description

      A DESCRIPTION OF THE PROBLEM :
      HttpClient throws "java.io.IOException: too many concurrent streams" instead of opening additional connections.

      When making high-volume asynchronous requests to an HTTP endpoint where the concurrent stream limit is exceeded, HttpClient starts failing rather than opening additional connections to handle the request throughput.

      This makes using HttpClient difficult and unreliable in high throughput scenarios, since the caller has to manually handle a generic IOException, parse the text of the message to understand that the number of max concurrent streams has been exceeded, then create an additional HttpClient instance(s) and multiplex requests across them.

      It is impossible for the caller to know how those requests should be multiplexed effectively, and error prone to have to parse the message of an exception to understand when to do so.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Create an HttpClient instance
      2. Send high throughput asynchronous requests
      3. Wait for the max concurrent streams to be exceeded

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      HttpClient creates additional connections so that asynchronous requests do not fail.
      ACTUAL -
      HttpClient asynchronous requests fail, essentially making HttpClient impossible to use asynchronously in high throughput scenarios.

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              michaelm Michael McMahon
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: