Rate This Document
Findability
Accuracy
Completeness
Readability

Tomcat Multi-User Request Connection Timeout

Symptom

Environment information: CentOS 7.6, MySQL 5.7.26, and Tomcat 8.5.32

LoadRunner is running on the stress test server increasing the stress on the application server to verify the performance of the tested system under different stresses. During the test of multi-user connections, when connections exceed 3, the connection fails. The following information is displayed:

Action.c(10): Ernor -27796: Failed to connect to server "128.5.69.44:8082": [10048] Address already in useTry changing the registry valueHKEY LOCAL MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelay to 30 and HKEY LOCAL MACHINE\System\CurrentControlSet\Services\tcpip\Panemeters MaxUserPort to 65534 and rebooting the machineSee the readme.doc file for more information

Key Process and Cause Analysis

The excellent performance of the load generator causes the generator to send data packets too fast. As a result, the server port is fully occupied without a timeout.

Conclusion and Solution

Adjust the timeout parameters to solve this problem.

  1. Change the request timeout interval in run time setting.

    Click Options in Preferences, and change the values of HTTP-request connect timeout, HTTP-request receive timeout and Step download timeout to 1000, 1000, and 10000 respectively.

  2. Deselect Download non-HTML resources in Browser Emulation.
  3. Choose Runtime Setting > Internet Protocol: Preferences > Advanced, and select winlnet replay instead of sockets.
  4. Test the multi-user connection again.