Search code examples
javajmeterstack-overflow

Jmeter - Unknown Error Writing Event


I got an output error while running a JMeter test: Logging Error: Unknown error writing event.

I've seen these before but they usually relate to Java being out of memory. However, this time the related error was listed as:

java.lang.StackOverflowError
    at java.security.AccessController.doPrivileged(Native Method)
    at java.io.PrintWriter.<init>(PrintWriter.java:116)
    at java.io.PrintWriter.<init>(PrintWriter.java:100)
    at org.apache.log.format.PatternFormatter.getStackTrace(PatternFormatter.java:555)
    at org.apache.log.format.PatternFormatter.formatPatternRun(PatternFormatter.java:472)
    at org.apache.log.format.PatternFormatter.format(PatternFormatter.java:446)
    at org.apache.log.output.AbstractOutputTarget.format(AbstractOutputTarget.java:118)
    at org.apache.log.output.AbstractOutputTarget.doProcessEvent(AbstractOutputTarget.java:77)
    at org.apache.log.output.AbstractTarget.processEvent(AbstractTarget.java:108)
    at org.apache.log.Logger.fireEvent(Logger.java:632)
    at org.apache.log.Logger.output(Logger.java:607)
    at org.apache.log.Logger.output(Logger.java:590)
    at org.apache.log.Logger.error(Logger.java:229)

Solution

  • It normally indicates an issue with your script, i.e. endless recursion, cyclic regular expression or whatever so my suggestions are:

    1. Double check your script consistency, i.e. run it with 1-2 users with View Results Tree listener enabled to make sure it does what it is supposed to do.
    2. Increase Java stack size via -Xss4 JVM argument.
    3. Make sure you are following recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure guide, at least basic ones such as:

      • Run your test in non-GUI mode
      • Increase JVM Heap space for JMeter
      • Disable all the listeners during test execution