Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2896

Undertow - max-connections in http[s]-listener does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.0.0.ER7
    • 7.0.0.ER3, 7.0.0.ER4
    • Undertow
    • None
    • Regression
    • Hide

      1. start the server, connect to it, set max-connections:
      /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=max-connections,value=20)
      reload
      2. deploy attached web archive that enables you to create long-running connection to server:
      deploy long-running-servlet.war
      3. perform request to server like this (duration means how long time request should take):

      http://localhost:8080/long-running-servlet/HeavyProcessing?duration=5000

      Ok, so perform requests, eg:

      for i in {1..300}; do curl http://localhost:8080/long-running-servlet/HeavyProcessing?duration=5000 & done

      and see connections, eg:

      while true; do output=$(lsof -i | grep -e "localhost" -e "127.0.0.1"); echo "${output}"; echo -n "Connections: "; echo "${output}" | grep "webcache->.*(ESTABLISHED" | wc -l; echo "---"; sleep 1; done
      • when using ER2, ER3 and ER4 with max-connections attribute undefined then all connections are processed in parallel - this is just fine.
      • when using ER2 with max-connections attribute set to 20 then processing of created requests is limited apparently - this is just fine.
      • when using ER3 or ER4 with max-connections attribute set to 20 then all connections are processed in parallel again, which is wrong.
      Show
      1. start the server, connect to it, set max-connections : /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=max-connections,value=20) reload 2. deploy attached web archive that enables you to create long-running connection to server: deploy long-running-servlet.war 3. perform request to server like this (duration means how long time request should take): http: //localhost:8080/ long -running-servlet/HeavyProcessing?duration=5000 Ok, so perform requests, eg: for i in {1..300}; do curl http: //localhost:8080/ long -running-servlet/HeavyProcessing?duration=5000 & done and see connections, eg: while true ; do output=$(lsof -i | grep -e "localhost" -e "127.0.0.1" ); echo "${output}" ; echo -n "Connections: " ; echo "${output}" | grep "webcache->.*(ESTABLISHED" | wc -l; echo "---" ; sleep 1; done when using ER2, ER3 and ER4 with max-connections attribute undefined then all connections are processed in parallel - this is just fine. when using ER2 with max-connections attribute set to 20 then processing of created requests is limited apparently - this is just fine. when using ER3 or ER4 with max-connections attribute set to 20 then all connections are processed in parallel again, which is wrong.

      When configuring max-connections attribute in http-listener or https-listener to some number - eg. 20 - I am still able to create more concurrent connections to server. This feature was actually working in EAP 7.0.0.ER2

      Note: I have not tested this with ajp-listener.

            sdouglas1@redhat.com Stuart Douglas
            jstourac@redhat.com Jan Stourac
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: