OOM when creating the report

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid25936.hprof …
Heap dump file created [490282851 bytes in 11.711 secs]
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuffer.append(StringBuffer.java:224)
at com.dongxiguo.fastring.Fastring$$anonfun$toString$1.apply(Fastring.scala:45)
at com.dongxiguo.fastring.Fastring$$anonfun$toString$1.apply(Fastring.scala:44)
at io.gatling.charts.template.StatsJsonTemplate$$anon$1.foreach(StatsJsonTemplate.scala:33)
at io.gatling.charts.template.StatsJsTemplate$$anon$1.foreach(StatsJsTemplate.scala:34)
at io.gatling.charts.template.StatsJsTemplate$$anonfun$io$gatling$charts$template$StatsJsTemplate$$renderStatsGroup$1$1$$anon$3.foreach(StatsJsTemplate.scala:48)
at io.gatling.charts.template.StatsJsTemplate$$anon$4$$anonfun$foreach$1.apply(StatsJsTemplate.scala:53)
at io.gatling.charts.template.StatsJsTemplate$$anon$4$$anonfun$foreach$1.apply(StatsJsTemplate.scala:53)
at scala.collection.immutable.List.foreach(List.scala:318)
at io.gatling.charts.template.StatsJsTemplate$$anon$4.foreach(StatsJsTemplate.scala:53)
at io.gatling.charts.template.StatsJsTemplate$$anon$5.foreach(StatsJsTemplate.scala:40)
at io.gatling.charts.template.StatsJsTemplate$$anon$6.foreach(StatsJsTemplate.scala:59)
at com.dongxiguo.fastring.Fastring.toString(Fastring.scala:44)
at io.gatling.charts.template.StatsJsTemplate.getOutput(StatsJsTemplate.scala:96)
at io.gatling.charts.report.StatsReportGenerator.generate(StatsReportGenerator.scala:70)
at io.gatling.charts.report.ReportsGenerator$.generateStats$1(ReportsGenerator.scala:34)
at io.gatling.charts.report.ReportsGenerator$.generateFor(ReportsGenerator.scala:53)
at io.gatling.app.Gatling.generateReports$1(Gatling.scala:156)
at io.gatling.app.Gatling.start(Gatling.scala:209)
at io.gatling.app.Gatling$.fromMap(Gatling.scala:58)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:79)
at io.gatling.app.Gatling$.main(Gatling.scala:53)
at io.gatling.app.Gatling.main(Gatling.scala)

I added -Xmx to a bigger value, it work. But when showing the report on firefox or chrome, it is really slow, So I have to kill the pages… There are around 100000 requests there for 1 hour running. Is that the upper limit that the graph can handle?

Thx
Shawna

Hi,

​Try to tweak the report accuracy : https://github.com/excilys/gatling/blob/master/gatling-bundle/src/main/assembly/assembly-structure/conf/gatling.conf#L74

Try to put more than 100 in your case.


Nicolas


When you say 100000 requests, do you mean 100000 HTTP requests executed, or 100000 different request types/names?

What this mean? #accuracy = 10

#accuracy = 10 what this mean?

Hi,

This parameter controls the accuracy of the various metrics provided in Gatling reports.
As processing large reports, like yours, can consume a lot of memory, this parameter, by reducing the accuracy of those metrics, helps keeping the memory consumption at a reasonable level.

The default setting is 10 ms, which provide good accuracy.
But in your case, with a lot of requests and a 1 hour scenario, there’s a good chance that your response times are widely distributed, and reducing the accuracy to 50 ms or 100 ms could still provide pretty accurate results.

The choice is yours : reducing accuracy and reducing memory consumption OR keeping the accuracy to its current level but you’ll need more memory.

Cheers,

Pierre

Got it. thx!

One more question, what is the best way to get the slowest 1% url? Now I am into a dilema, if I print out every url, the report can take long time to show up sometime even die of no response. If I only printout groups of url, then I can’t get the exact slowest url"

e.g : If i can put

  1. exec.http("/people/${userName}") or
  2. exec.htt[("/people").

#1 can give me the time for each individual url. but when there are a lot, the report can be slow in respond
#2 can’t give me individual url, but the report can be fast to show and order

Is there a way that I can get both? e.g, I can specify the % of the slowest url that I want to see even when I use #2 to identify groups of http request?

The reports weren’t designed with your use case in mind (displaying thousands of different lines).

The only solution I see is you writing your own simulation.log parsing (in 2 times: once for computing the percentile, once for filtering).
Note that you can edit the simulation.log with you own parser so that you can go from 1 to 2 or vice-versa.

Cheers,

Stéphane

I had a successful 48 hours run with gatling recently, But when I tried to generate the report, it keeps give me OOM, even I increase Xmx to the maximum and change the timout to be 500 ms (I tried 100 as well). So is there any other way get it going?

Could you share your simulation.log file so we can investigate?

Yes, attched.

What’s the size of the file ? I don’t think you can attach it to an email.

Can you see the attachment?

Nope. What’s the file size? I would assume a couple of Gb, no?

I’m not sure that Google Groups policies let you attach files.
Please either upload to a share platform, or sent directly to slandelle@excilys.com

Can you access this?
https://hotfile.com/dl/232248363/5ffd07f/overall-48-20130630173656.tar.gz.html

Yes, thanks!
I think I have an idea of what the problem is (I guess you have millions of different request names).

You have 555.507 different request names, meaning that the report engine would have to draw as many lines.
It definitively wasn’t designed for this use case, and honestly, even if you were able to generate the reports, no browser would be able to display them (for example, the menu would have 555.507).

What produces the OOM is the report engine, so you’d better turn it off (use the no-reports option): https://github.com/excilys/gatling/wiki/Configuration#wiki-cli-options
You’ll still have the simulation.log file, but will have to do the analytics processing yourself.

Stéphane

Thx for looking into it. I have updated the case to reflect only the request category instead of individual request name.

在 Jul 4, 2013,12:37 AM,Stéphane Landelle <slandelle@excilys.com> 写道: