Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-721

High CPU usage observed when the server closes the connection after responding with the Keep-alive header to a load test with large payload.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 4.4.15
    • None
    • HttpCore NIO
    • None
    • JDK 8_261 and above

    Description

      Hi,

      In HTTPCoreNIO 4.4.15, for JDK 8_261 and above, we can observe a high CPU usage for the following scenario.

      • Client behavior: sends POST/PUT requests with a payload greater than the buffer size. Should be a load test at least with two requests.
      • Server behavior:  responds with the Connection: keep-alive header and immediately closes the connection using the connection close method.

      Please note that for JDK version < JDK 8_261, this is not reproducible. In order to reproduce the issue, I have written a test server and a JMeter script to act as a client.

      Reproducible steps:

      1. TestServer.java - Run this main class, which starts the server on port 8253. (I have only changed the “completeResponse” method to close the connection at line #753).
      2. HTTPClient.jmx - Start this JMeter script, which sends two POST requests to the server with a large payload.

      Please let us know the validity of this scenario. For now, I am creating this as a Bug as high CPU usage is observed.

      Thanks & Regards,
      Sajinie

      Attachments

        1. HttpCoreNIOTestServer.zip
          182 kB
          Sajinie Kavindya
        2. HTTPClient.jmx
          114 kB
          Sajinie Kavindya

        Activity

          People

            Unassigned Unassigned
            sajiniekavindya Sajinie Kavindya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: