LoadRunner – Server XXX has shut down the connection prematurely

Problem:

In the LoadRunner test result, you may have seen the issue related to shutting down the server connection prematurely. If this error is identified many times in the test then it may lead to the failure of the test. Let’s investigate why this error occurs and how to solve it.

Error Statement:

Server XXX has shut down the connection prematurely

where XXX represents Server Name or IP address

Reason:

The specified server closes the established connection. This is because the server does not get the response from the client (LoadRunner) in the defined time-out limit and closes the connection. Hence LoadRunner throws this error message.

Possible Causes:

  1. The sharp ramp-up of the VUsers i.e. starting too many Vusers in short ramp-up.
  2. Too many Vuser’s on a single Load Generator.
  3. Access Vusers are held up at Rendevous Point.

Troubleshooting:

  1. Increase the ramp-up time of Vusers
  2. Limit the user count at the Rendevous point using the Rendevous Policy.
  3. Use the appropriate number of Load Generators (LG Calculator)
  4. Proper distribution of the load on each Load Generator.
  5. Add below function at the beginning of the VuGen script:
    web_set_sockets_option(“IGNORE_PREMATURE_SHUTDOWN”, “1”);
  6. If the above function does not work then add another function:

    web_set_sockets_option(“MAX_CONNECTIONS_PER_HOST”,”1″);

    This function should be added at the very beginning of the script. This function forces a single connection to the server thus eliminating the possibility of shutting down an existing connection prematurely. Also, it eliminates the causes of error when LoadRunner sends data using that connection.
  7. Clear the “Temp” folder of the Load Generator and Controller.

You may be interested: