Websocket Single Write Sampler shuts down after a while

Issue #155 new
Former user created an issue

i'm currently trying establish a websocket connection with a server to send JSON payloads in the websocket single write sampler. I start by using a Websocket Open Connection Sampler with wss//(server-adress):443/(endpoint-name). At the beginning the JSON Payload gets sent and it returns status 200 (OK). After 40 seconds the Websocket Single Write sampler disconnects and returns the following error : Response message:WebSocket I/O error: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Broken pipe (Write failed).

I'm assuming it has something to do with the SSL of my server adress. The SSL is working fine but it seems that in the process the connection is switching to ws and shuts down the connection. The terminal also returns this error: SingleWriteWebSocketSampler: Sampler 'WebSocket Single Write Sampler': there is no connection to re-use. Mean while the setting is set to use existing connection

Does anyone have any suggestion how i might be able to solve this?

Comments (3)

  1. Peter Doornbosch repo owner

    In your testplan, does the Websocket Single Write sampler start immediately after the other sampler returns status 200? Or is there a delay in between, and if so, you long is this delay?

  2. Youssef Kassem

    Hey Peter, i added a timer which caused the Websocket Single Write sampler to send a request every 3 seconds. But the pipe still broke after 40-50 seconds.. still cant figure out why it breaks when the connection was established with the Websocket Open Connection Sampler. So now it open the connection then the Websocket Single Write sample sends a couple of successful requests and then it breaks after a while

    The server accepts the first couple of requests and when it breaks it only says websocket connection disconnected.

    The scenario that i am trying to mimick is sending 3 JSON payload with a jpeg image (300kb) every second. so 3 JSON frames per second. The app im working on is able to send thousands of these JSON frames without a problem. But im trying to simulate the app with 10 threads to see how the server reacts.

    By the way im dutch aswel so nice to find out that you are from around here aswel 🙂

  3. Kalpit

    @Youssef can you tell please how are you sending JSON payloads to the server. My server is unable to read JSON payload when sent using jmeter.

    Thanks in advance!

  4. Log in to comment