Is response size limited? Getting truncated response and then next read fails with " unsupported frame type: 0"

Issue #22 resolved
Former user created an issue

Hi Peter.

Great plugin - thank you very much for developing this.

I'm trying to use it with my application with typically sends large responses back on the websocket. From a jMeter perspective my thread group is doing the following: 1) Websocket Open Connection 2) Websocket Single Write Sampler (I send a frame to the server) 3) Websocket Single Read Sampler (I expect a large initial response back) 4) Websocket Single Read Sampler (I expect a smaller subsequent response back)

When I run the test the following happens: 1) Pass 2) Pass 3) Pass but I can see the response data is truncated - it is not the full JSON response I expect. 4) Fails with "Response message: Sampler error: java.lang.RuntimeException: unsupported frame type: 0"

The full stack trace for 4) above is: {code} 2017-05-05 14:09:35,037 ERROR e.l.j.w.SingleReadWebSocketSampler: Unhandled error in sampler 'WebSocket Single Read Sampler'. java.lang.RuntimeException: unsupported frame type: 0 at eu.luminis.websocket.Frame.parseFrame(Frame.java:92) ~[JMeterWebSocketSamplers-0.7.3.jar:?] at eu.luminis.websocket.WebSocketClient.receiveText(WebSocketClient.java:255) ~[JMeterWebSocketSamplers-0.7.3.jar:?] at eu.luminis.jmeter.wssampler.SingleReadWebSocketSampler.doSample(SingleReadWebSocketSampler.java:68) ~[JMeterWebSocketSamplers-0.7.3.jar:?] at eu.luminis.jmeter.wssampler.WebsocketSampler.sample(WebsocketSampler.java:110) [JMeterWebSocketSamplers-0.7.3.jar:?] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491) [ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425) [ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254) [ApacheJMeter_core.jar:3.2 r1790748] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]

So is there a limit to response size and in this case and if it is exceeded can it somehow break a subsequent request?

The full expected response to 3) is about 12.4Kb but it seems to get cut off at about 8Kb if that helps?

More data (full JSON response) if you need it.

Many thanks,

Neil

Comments (17)

  1. nbillett

    I should add that I'm using version 0.7.3 of the plugin with jMeter 3.2 on OSX with JDK 1.8.0_51

    I also tried setting view.results.tree.max_size=0 in jmeter.properties but it had no effect.

  2. nbillett

    ...and googling around I see that 8Kb is a typical message chunking point for web requests. I think our web server is chunking messages based on this limit so does the read aspect of this plugin handle chunked messages? Perhaps 4) in my example above is misreading the next chunk of the truncated message from 3) ?

  3. Peter Doornbosch repo owner

    Hi Neil,

    Thanks for the feedback.

    Large responses are supported. But your guess was right: frame type 0 is a continuation frame (websocket terminology for a chunked response) and that is currently not supported. Sorry ;-( I would be happy to add it, but that will take a while, I'm quite busy at the moment.

  4. nbillett

    Thanks for the response Peter.

    No worries at all. I managed to download the src and just about get it to handle chunked frames for my system. It wouldn't be worthy of feeding back to you though as its very hacky and only for text frames (and probably wrong in many other ways).

  5. parvez ali

    Hi @Peter Doornbosch
    I am facing the same issue. Using Jmeter 5.3, Java 1.8 with JMeterWebSocketSamplers-1.2.8
    Getting truncated response if data is more than 8 kb. I am quite new with all this. Could you please suggest? Thanks in advance.

  6. Peter Doornbosch repo owner

    Hi Parvez Ali,

    Did you notice this issue is resolved? Did you read the documentation about continuation frames?

  7. Abhishek Performance

    Hi @Peter Doornbosch … my response doesnt load more than 8 KB… am not sure… how i can i get this right. I am using 5.2.1 Jmeter and 1.2.8 plugin Manager…. i have used your websocket samples…… WebSocket Single Read Sampler doesnt load more than 8kb of response data.

    Kindly help

    I checked out in docs.. but the images in it didnt help me…. could you kindly provide any link if you have… to overcome this limitation?

  8. Abhishek Performance

    Thanks for the link.. I was just trying to understand in which part there is help around to overcome the challenge of 8kb limitation of web socket single read sample. I have used Java 8 and did download the same plugins as shown in the images.

  9. Peter Doornbosch repo owner

    There is no 8 kb limitation in the sampler. It is your server that splits response into 8kb frames. As the single-read-sampler reads a frame, you just need to do more reads. This is all explained in the readme.

  10. Abhishek Performance

    @Peter Doornbosch thanks a lot for the clarification.. i have a below suggestion to performance testers who deal with this for first time… with your permission may i let the below content be available here? If no… feel free to remove my comment.

    Appreciate your efforts on this!

    Okay… anyone whos facing the same issue… here is what you could do..

    If your response truncates at 1st read sampler… add one more read sampler below it with “use existing connection” Add a RegEx on both the samplers that captures the entire response….

    Append these two responses in a Dummy Sampler’s response and you should now get it the entire part.

  11. Log in to comment