Server XXX has shut down the connection prematurely

Hi I keep on getting this error message whenever I replay the script in VuGen. Note that this is only 1 VUser so It is impossible for this to be an issue of rampup since there's no rampup happening. 

Server XXX has shut down the connection prematurely

I already tried the following solutions listed below: (from https://www.perfmatrix.com/loadrunner-server-xxx-has-shut-down-the-connection-prematurely/#SnippetTab)

  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:

But nothing works. This just happened suddenly and still cant progress as to how I am going to fix this. Can someone please advice?

Regards,

Walas

Parents
  • 0  

      ,

    Which LR version are you using? Dit you reply the script on a different computer as well?

    Does the script always fails at the same call or when not, always with the same remote-server?

    Did you had a look to the server logs?

    The ultimate investigation is using wireshark and enable full logging in VuGen to check for any timing issues.

    There are many 'blogs' on the internet about this error, you might explore those and see if there is any clue that helps you.

    The blogs indicate that the server shutsdown the connection because the client is too slow. You might try to run VuGen as Administrator and via task manager change the priority to "Above Normal". That might help on timing issues. Try to disable anti-virus software (or exclude VuGen).

    How to ask questions

    Reward contributions via likes or 'verified answers'

  • 0 in reply to   

    Which LR version are you using?

    - I am using LR Version CE 24.1

    Dit you reply the script on a different computer as well?

    - I also tried it in my local and windows server and experience the same issue. Since it happened suddenly, I am having a hard time investigating this.

    Does the script always fails at the same call or when not, always with the same remote-server?

    - 100% fails at the same call/request both in local and remote-server. 

    Did you had a look to the server logs?

    -Unfortunately, I don't have any means to look at the server logs

    The ultimate investigation is using wireshark and enable full logging in VuGen to check for any timing issues.

    -I'll try to do this then :)

    There are many 'blogs' on the internet about this error, you might explore those and see if there is any clue that helps you.

    - Yeah, already looked on to those but their solution doesn't fix my issue. I will be posting the work-around I investigated.

    The blogs indicate that the server shutsdown the connection because the client is too slow. You might try to run VuGen as Administrator and via task manager change the priority to "Above Normal". That might help on timing issues. Try to disable anti-virus software (or exclude VuGen).

    -Okay okay ill also try this Slight smile. Is it possible that this is application issue? I have read somewhere that this type of cases are application issue and not script itself.


    Side Note: 

    I tried tried to enable "Continue on Error" in Runtime settings. Basically, I still receive the error on that request and continues to run. Upon checking all of the transactions, they are even passing succesfully in End-to-End scenario(considering I still got the error on early transactions). So its working but I believe it is only a work-around. not the solution itself.

    Thanks  

  • 0   in reply to 

    Continue on error flags the transaction still as error, Did you saw in internet a remark about:

    web_set_sockets_option("IGNORE_PREMATURE_SHUTDOWN", "1");

    Sometimes LR tries to emulate multiple connections in case of "Mode=HTML"  and concurrent_start/end sections. Each VUser consumes only one thread, so multi concurrent connections are interleaved. .There is also an web_set_option call that limit the amounts of connections per Vuser to a single destination.

    When the URL fails on a resource the above call might be OK, but else you might combine them with:

    web_set_sockets_option(“MAX_CONNECTIONS_PER_HOST”,”1″);

    I think that this is what I learned from my friend Google.

    Succes, Erik

    How to ask questions

    Reward contributions via likes or 'verified answers'

Reply
  • 0   in reply to 

    Continue on error flags the transaction still as error, Did you saw in internet a remark about:

    web_set_sockets_option("IGNORE_PREMATURE_SHUTDOWN", "1");

    Sometimes LR tries to emulate multiple connections in case of "Mode=HTML"  and concurrent_start/end sections. Each VUser consumes only one thread, so multi concurrent connections are interleaved. .There is also an web_set_option call that limit the amounts of connections per Vuser to a single destination.

    When the URL fails on a resource the above call might be OK, but else you might combine them with:

    web_set_sockets_option(“MAX_CONNECTIONS_PER_HOST”,”1″);

    I think that this is what I learned from my friend Google.

    Succes, Erik

    How to ask questions

    Reward contributions via likes or 'verified answers'

Children
  • 0 in reply to   

    Thanks  , 

    I forgot to add that into the notes. I also tried that but unfortunately, whenever I add that code to my script, it will not make any progress with the transactions and until we got Connection Timeout(configured in Runtime Settings).

    Now one thing I discovered from what I mentioned days ago, "Continue on Error" works for me as I can proceed with End to end scenario successfully and verified them correctly. Which brings me to the question - why does my script work with correct details even if I got that error "Server XXX has shut down the connection prematurely" in early transaction?