WebSocket I/O error: Read timed out when receive a lot of message

Issue #73 closed
Bui Hoang Duong created an issue

Hi, I'm testing socket.io, with scenario 8000 viewers join a stream and do some activities (send like, chat message ...). If the viewers only join stream and do not send activity, it is OK. But if the viewers do some activities, which will cause server send ALL_MESSAGE to all viewers in this stream, the Websocket request - response sampler will be read timeout, and the connection will be lost. I think it is because of the jmeter server received a lot of messages (eg 8000 activities will receive 800000 messages in case 100 viewers per stream) I've tried to use websocket text frame filter to receive pong message only, but it still happen. How can I bypass the ALL_MESSAGE from server?

Comments (4)

  1. Peter Doornbosch repo owner

    Hi,

    It's not clear to me what your test scenario is. "viewers", "stream", "activity" "ALL_MESSAGE", these are all concepts that do not exist on websocket level, but in your domain, which i don't know.

    Do you mean, that

    • your JMeter test has 8000 threads, with each thread simulating 1 viewer?
    • your test scenario is a message that is sent by the server to all clients (viewers)? Or all clients (viewers) sending and receiving mesages?
    • what is exactly going wrong: do some samplers time out or do all samplers time out?

    In general, the best advice is to start with small numbers and increase when all goes well. When performance testing, there is always a bottleneck somewhere. It can be the server under test, the network, your local router, your local network, your PC running JMeter, JMeter itself, etc. You have to find the bottleneck, for example by varying the test case (e.g. use multiple PC's, test from different networks, etc) or use protocol analyser to find out what is going on. If the server is the bottleneck, then your test has been successful in the sense it helped you discover the limits of the server ;-). But as i said: always start with small numbers and make sure that it all works fine and then slowly increase numbers.

    Regards Peter

  2. Bui Hoang Duong reporter

    Hi Peter, My Jmeter test has 8000 threads, which simulate a viewer to join 80 live streaming rooms (100 viewer per stream). Each viewer will send a message to server each 2 minutes (send like action, send chat message action), and then server will send message to all viewers in this live streaming room. When the viewer up to 8000, I think the number of response message is too large, and cause ping pong of some threads timeout and the connection will be disconnected. If I still running, most connections will be disconnected. Do you have any idea to prevent such large number of response message from server to Jmeter server? I've tried to increase default socket buffer size follow this link https://stackoverflow.com/questions/18985816/change-default-socket-buffer-size-under-windows, but still happen.

  3. Peter Doornbosch repo owner

    I still don't understand what kind of behaviour you are observing and what is exactly going wrong. Your description is too vague, and i'm not sure what is exactly happening, and what are assumptions. I can't help you as i don't even understand what the problem is.

    What is clear, it that you are running into some bottleneck. As explained above, this is normal when performance testing, because there is always a bottleneck. First, you need to find out who is causing the bottleneck, is it the JMeter test or the server, or your network? It is not as easy as randomly increasing a buffer size, you need to understand the problem before you can solve it. If you want me to help you, you must explain better what you are doing, and what is going wrong.

    Did you try to test with smaller numbers? Were those tests successful?

    In the 8000-test, what is the first error you encounter? If it is a timeout, explain where the timeout happens. If it is a disconnect, explain who is disconnecting and in what way (does it send a websocket close or tcp close or is it just dropping the connection?), etc.

  4. Log in to comment