WebSockets: Check didn't succeed by the time a new one was set up

I am running performance tests using gatling. Gatling is scaling very well for API calls but i find consistent exceptions on websockets. I am not sure if it is a server-side or client-side issue. Ia ms ending websocket heartbeats and waiting for replies from the server using check(). The code goes like so:

val sendHeartBeat=repeat(repeatCount){
              ws("Send HeartBeat")
              ws("Check HeartBeat")
              .check(wsListen.within(3500).until(1))). exitHereIfFailed

The problem arises at the check stage. I run my tests for an hour or so but a few “users” drop off giving Check didn’t succeed by the time a new one was set up error.

What probably happens is that the server heartbeat message is received before the check is set (atm, we don’t keep a “just in case” buffer).
You probably want to set the check on the sendText.

Hi Tanmay,

I have good news: Krisztian spotted the issue. Fixing!



Thanks, please keep me posted about the development.

Issue is fixed in repository. We’ll release 2.0.3 next week.