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){
.exec(
ws("Send HeartBeat")
.sendText("HeartBeatMessage")).exitHereIfFailed
.exec(
ws("Check HeartBeat")
.check(wsListen.within(3500).until(1))). exitHereIfFailed
.pause(4000)
}
...
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.