Tuesday 5 July 2016

Server has shut down the connection prematurely

Server has shut down the connection prematurely

First thing "Server xyz has shut down the connection prematurely " is not a webserver issue.
This is purely loadrunner issue and is one of the major pain area.

Solutions:
1. Make sure we are not ramping up all user simultaneously
2. Rendez point are not holding up too many users.
3. Make sure retry option is greater than 5
4. Check network connectivity or blockage.
5. Decrease the load from loadrunner machine
6. Clear the Temp folder in (Documents and Settings-->user-->Local Settings)-->Temp
    and restart the machine on which loadrunner is installed (This one is my favorite, it has always helped me in getting rid from this error, but the condition is that scripts ran successfully before and now you suddenly start seeing this error)
7. If above solution also doesn't work then, Recently I observed that if we suddenly start seeing this issue, then best option is to restart all machines and servers in your network or load test domain (after following point No. 6) .

Put this in script, not a solution but just the workaround, you will not see error, but issue will still exist
web_set_sockets_option ("NEW_BEHAVIOR_OF_OVERLAPPED_SEND", "1");
If none of the above option helps then put web_set_sockets_option("IGNORE_PREMATURE_SHUTDOWN", "1");  in vuser_init()

You can also try following
Run time settings --> Preferences --> Use WinInet Replay instead of Sockets (windows only)
but it worked in very specific cases. Not a general solution.