OOM Issue with Latest version for 3.8.4

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid2092.hprof …
Heap dump file created [161849680 bytes in 0.324 secs]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.gatling.plugin.util.MainWithArgsInFile.runMain(MainWithArgsInFile.java:53)
at io.gatling.plugin.util.MainWithArgsInFile.main(MainWithArgsInFile.java:34)
Caused by: java.lang.OutOfMemoryError: Java heap space
at scala.collection.mutable.HashMap.get(HashMap.scala:420)
at io.gatling.charts.stats.buffers.GeneralStatsBuffer.update(GeneralStatsBuffers.scala:70)
at io.gatling.charts.stats.buffers.GeneralStatsBuffers.updateRequestGeneralStatsBuffers(GeneralStatsBuffers.scala:49)
at io.gatling.charts.stats.ResultsHolder.addRequestRecord(ResultsHolder.scala:71)
at io.gatling.charts.stats.LogFileReader.$anonfun$secondPass$1(LogFileReader.scala:176)
at io.gatling.charts.stats.LogFileReader.$anonfun$secondPass$1$adapted(LogFileReader.scala:171)
at io.gatling.charts.stats.LogFileReader$$Lambda$934/0x000000080116e030.apply(Unknown Source)
at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1293)
at io.gatling.charts.stats.LogFileReader.secondPass(LogFileReader.scala:171)
at io.gatling.charts.stats.LogFileReader.$anonfun$read$2(LogFileReader.scala:70)
at io.gatling.charts.stats.LogFileReader$$Lambda$933/0x000000080116d628.apply(Unknown Source)
at io.gatling.charts.stats.LogFileReader.parseInputFiles(LogFileReader.scala:81)
at io.gatling.charts.stats.LogFileReader.read(LogFileReader.scala:70)
at io.gatling.app.RunResultProcessor.initLogFileData(RunResultProcessor.scala:52)
at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:34)
at io.gatling.app.Gatling$.start(Gatling.scala:101)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:53)
at io.gatling.app.Gatling$.main(Gatling.scala:41)
at io.gatling.app.Gatling.main(Gatling.scala)
… 6 more
Press any key to continue . . .
Where do I change the JVM settings for the latest version

Where do I change the JVM settings for the latest version

It depends on the launcher you use.
Do you use the bundle? If so, have you checked the help menu (choice #4)?

downloaded the latest version bundle from Open Source Load Testing - Gatling before we move to enterprise edition. Ihope it works once it is moved to enterprise

do we need to change this settings? set JAVA_OPTS=%JAVA_OPTS% -Xms32M -Xmx128M in gatling.bat file or in help how much memory we can increase for intelliJ IDE

downloaded the latest version bundle from

Meaning that you’re using the zip bundle and launching from the gatling.sh or gatling.bat. Increasing the heap size for your IntelliJ editor is unrelated. You really have to select option 4 here to check the parameter you need to pass to increase the heap size.

before we move to enterprise edition. Ihope it works once it is moved to enterprise

Yes. Gatling Enterprise uses a different reporting engine.

Thanks . What is the recommended JVM options to run locally?
ecjo, --extra-compiler-jvm-options “-Option1 -Option2”
Defines additional JVM options used when compiling your code (e.g. setting the heap size with “-Xms2G -Xmx4G”).Current host memory is 16GB.

--extra-compiler-jvm-options is for compiling your Scala and Java code, not for executing the compiled code, which is --extra-run-jvm-options.

I can’t say how much you need. Your issue here is that you have a humongous simulation.log file. You might need twice the file size in heap to be able to parse it.

Thanks changed these settings to set JAVA_OPTS=%JAVA_OPTS% -Xms2048M -Xmx4096M in gatling.bat this should also work right?

No. This would change the settings for the launcher, not for the fork process that runs the load test.

.\gatling.bat -erjo --extra-run-jvm-options “-Xms2046M -Xmx4096M” tried this command to run assigning the heap size?but seeing unknown argument

1 Like