Search code examples
jmeterload-testingperformance-testingjmeter-plugins

Jmeter Flexible file writer: BufferOverflowException with large data (41793 characters)


I am facing below error while writing large JSON object(41793 characters) in a csv using Jmeter plugin Flexible file writer. Could anyone help me please??

Error trace:

ERROR - jmeter.threads.ListenerNotifier: Detected problem in Listener:  java.nio.BufferOverflowException
    at java.nio.DirectByteBuffer.put(Unknown Source)
    at java.nio.ByteBuffer.put(Unknown Source)
    at kg.apc.jmeter.reporters.FlexibleFileWriter.appendSampleResultField(FlexibleFileWriter.java:359)
    at kg.apc.jmeter.reporters.FlexibleFileWriter.sampleOccurred(FlexibleFileWriter.java:230)
    at org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:84)
    at org.apache.jmeter.threads.JMeterThread.notifyListeners(JMeterThread.java:774)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:440)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
    at java.lang.Thread.run(Unknown Source)

2014/05/26 15:47:31 INFO  - jmeter.threads.ListenerNotifier: Continuing to process further listeners 
2014/05/26 15:47:31 INFO  - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1 
2014/05/26 15:47:31 INFO  - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test 

Solution

  • There is hard limit of 10KBytes: https://github.com/undera/jmeter-plugins/blob/master/standard/src/kg/apc/jmeter/reporters/FlexibleFileWriter.java#L223

    You can provide a Pull Request to make it configurable via jmeter property like it's done in several other places in the plugins code.