我们正在使用gatling sbt插件运行gatling模拟。每当我们运行此仿真时(以及其他情况下),我们都会从Java中收到OOM错误。 “ java.lang.OutOfMemoryError:请求的数组大小超出VM限制”
有趣的是,这仅发生在Gatling v。> 3中,但在Gatling 3.0.0-SNAPSHOT中却没有发生
我们已经尝试将XmX从64g升级到128g,还尝试将GC切换到G1,并且不断收到错误消息。从堆栈跟踪中可以看出,该错误来自Gatling内部,因此我们不确定该如何解决。
加特林团队的人有什么想法吗?
作为参考
Sbt.version = 1.3.3
Gatling-sbt plugin = 3.1.0
Gatling-test-framework = 3.3.1
Gatling-http = 3.3.1
Scala version 2.12.10
javaOptions in Gatling = "-Xmx64G", "-XX:MaxPermSize=128M", "-XX:+UseCompressedOops"
Jdk = 1.8
这是堆栈跟踪:
[error] Uncaught exception when running
<testname>: java.lang.OutOfMemoryError: Requested array size exceeds VM limit
[error] sbt.ForkMain$ForkError: java.lang.OutOfMemoryError: Requested array size exceeds VM limit
[error] at scala.collection.mutable.ArrayBuilder$ofInt.mkArray(ArrayBuilder.scala:327)
[error] at scala.collection.mutable.ArrayBuilder$ofInt.resize(ArrayBuilder.scala:333)
[error] at scala.collection.mutable.ArrayBuilder$ofInt.sizeHint(ArrayBuilder.scala:338)
[error] at scala.Array$.fill(Array.scala:267)
[error] at io.gatling.charts.stats.buffers.SessionDeltaBuffer.<init>(SessionDeltaPerSecBuffers.scala:34)
...
[error] at io.gatling.charts.stats.ResultsHolder.addSessionBuffers(ResultsHolder.scala:25)
[error] at io.gatling.charts.stats.ResultsHolder.addUserRecord(ResultsHolder.scala:39)
[error] at io.gatling.charts.stats.LogFileReader.$anonfun$secondPass$1(LogFileReader.scala:161)
[error] at io.gatling.charts.stats.LogFileReader.$anonfun$secondPass$1$adapted(LogFileReader.scala:154)
[error] at io.gatling.charts.stats.LogFileReader$$Lambda$847/1235205471.apply(Unknown Source)
[error] at scala.collection.Iterator.foreach(Iterator.scala:941)
[error] at scala.collection.Iterator.foreach$(Iterator.scala:941)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
[error] at io.gatling.charts.stats.LogFileReader.secondPass(LogFileReader.scala:154)
[error] at io.gatling.charts.stats.LogFileReader.$anonfun$resultsHolder$1(LogFileReader.scala:174)
[error] at io.gatling.charts.stats.LogFileReader$$Lambda$846/863964059.apply(Unknown Source)
[error] at io.gatling.charts.stats.LogFileReader.parseInputFiles(LogFileReader.scala:65)
[error] at io.gatling.charts.stats.LogFileReader.<init>(LogFileReader.scala:174)