Websocket messages from last thread group gives error when ran with multiple thread groups

Issue #261 invalid
Sagar Dhage created an issue

When I run a thread group individually which having websocket messages, thread group runs successfully with no errors but when I run the same along with multiple thread groups, It starts giving higher error rate

My observation: Websocket messages from last thread group gets combined with messages from other thread groups

I have tried multiple solutions to resolve this like, removing common variables across thread groups, using different loop controllers, using think time & pacing time.

I have attached the structure of my script.

Comments (5)

  1. Peter Doornbosch repo owner

    Observation or assumption?

    I would say it is impossible that websocket message of different thread-groups are combined, because:

    • each thread group has its own set of threads
    • websocket samplers use a websocketclient that is stored as a thread-local in the running thread.
    • so: each thread, in whatever thread group, has its own unique WebSocketClient and thus websocket connection.

    If you think this is not the case, i need to have a WireShark capture that shows messages get mixed.

    There is probably a simpler explanation for a higher error rate during the test.

  2. Sagar Dhage reporter

    That’s an assumption actually.

    One more point is, I have prepared a batch file to run the JMeter script for specific set of users. Have created different variables & they are mapped to thread groups (because each thread group will use different number of users)

    What can be the cause of higher error rate in websocket messages as per your knowledge?

  3. Peter Doornbosch repo owner

    The difficulty with performance test is that you are actually the whole chain: client pc, client os, jmeter, jmeter websocket plugin, client connectivity (network capacity etc.), network between client and server, server infra, server os, server software, etc.

    What often happens when people see an error (especially when the error is reported by JMeter ;-)), they think something is wrong in JMeter or in the plugin. While this could be the case, they forget all other elements in the chain.

    When you find errors the first things to check is:

    • your test plan: does it really do the same actions as a real client?
    • the server: as your intent is probably to test the server, do not be surprised that the server does not (yet) work as expected! You might expect that it would be capable of handling the load you generate, but maybe there is a stupid bug somewhere in the server code that is severly limiting the server’s capacity. So maybe your test is just successful and the errors indicate that server does not behave as you expected.

    Hth
    Cheer
    Peter

  4. Log in to comment