Cannot open more than 2300 threads with WSS samplers

Issue #41 closed
Former user created an issue

Hello! I'd appreciate it if you help me to investigate my issue. I'm trying to find the maximum load that I can create from my computer with my test scenario, which includes websocket samplers. I noticed that when the number of threads exceeds approx. 2300 threads, test requests begin to get errors like "Response code: Websocket I/O error. Response message: WebSocket I/O error: connect timed out" for some ws samplers and "Response code: Non HTTP response code: java.net.ConnectException. Response message: Non HTTP response message: Connection timed out: connect" for some http samplers (see screenshots attached). When I disable ws samplers, these errors don't appear. I checked it with both your and Maciej Zaleski's plugin - result is the same. Is there anything that can be done to avoid these errors? I've already done some registry tweaks to avoid TCP/IP Port Exhaustion: MaxUserPort is set to 65534 and TcpTimedWaitDelay is set to 30 sec, but it doesn't help.

Comments (10)

  1. Alexey

    Just for clarification to my initial description: when I run a distributed test using 2 machines running 2000 threads each - no errors appears.

  2. Peter Doornbosch repo owner

    Don't you think the most likely cause for these errors is that the resources of your machine are exhausted?

    I don't get this remark: "When I disable ws samplers, these errors don't appear.", because it seems pretty obvious that when samplers are not running, they do not encounter problems.....

  3. Alexey

    What kind of resources do you mean? There is still enough memory and CPU is not loaded at the time when errors appear.

    By that remark I mean that it's not purely the amount of threads itself what causes the problem but using ws samplers in them. I wonder if there is any other limitations in Java or Windows regarding WS which might be the root cause...

  4. Peter Doornbosch repo owner

    Maybe your network stack or network card cannot handle the traffic?

    From Java point of view, it's all just TCP streams (and on OS level TCP connections); both know nothing about websockets. So there is nothing special in that regard.

  5. Peter Doornbosch repo owner

    Btw, the title of this issue mentions "WSS" samplers. Do you really mean websockets over TLS or is it a typo?

  6. Alexey

    Yes, we use wss protocol, so samplers' Server URL settings are set to "wss". Does it make any difference regarding my problem?

  7. Alexey

    The problem cause was in using external server address instead of internal. External address load is limited by some protecting software and my requests were just rejected. :-) I've managed to start 5000 theads from a single machine using internal address now and I think it is possible to get even more. The issue can be closed. Thanks a lot for your assistance!

  8. Log in to comment