Generating reports out of memory

1,327 views
Skip to first unread message

Paul Langeard

unread,
Jun 1, 2012, 12:29:01 AM6/1/12
to Gatling User Group
Hi All,
I have an out of memry exception when generating the report. Maybe the
is a java configuration to increase maximum memory ?

Here is my trace :

Simulation Finished.
Generating reports...
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid25265.hprof ...
Heap dump file created [566428586 bytes in 10.653 secs]
Exception in thread "main" java.lang.reflect.InvocationTargetException
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:
532)
at com.excilys.ebi.gatling.core.result.reader.DataReader
$.newInstance(DataReader.scala:24)
at com.excilys.ebi.gatling.charts.report.ReportsGenerator
$.generateFor(ReportsGenerator.scala:58)
at com.excilys.ebi.gatling.app.Gatling.com$excilys$ebi$gatling
$app$Gatling$$generateReports(Gatling.scala:259)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$start
$1.apply(Gatling.scala:120)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$start
$1.apply(Gatling.scala:120)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at
scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike
$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:
120)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:72)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.lang.OutOfMemoryError: Java heap space
at scala.collection.mutable.ListBuffer.$plus
$eq(ListBuffer.scala:122)
at scala.collection.mutable.ListBuffer.$plus
$eq(ListBuffer.scala:44)
at scala.collection.mutable.GrowingBuilder.$plus
$eq(GrowingBuilder.scala:26)
at scala.collection.mutable.GrowingBuilder.$plus
$eq(GrowingBuilder.scala:24)
at scala.collection.TraversableLike$$anonfun$filter
$1.apply(TraversableLike.scala:252)
at scala.collection.LinearSeqOptimized
$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:76)
at scala.collection.generic.TraversableForwarder
$class.foreach(TraversableForwarder.scala:30)
at
scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:44)
at scala.collection.TraversableLike
$class.filter(TraversableLike.scala:251)
at scala.collection.mutable.ListBuffer.filter(ListBuffer.scala:
44)
at
com.excilys.ebi.gatling.charts.result.reader.FileDataReader.<init>(FileDataReader.scala:
61)
... 16 more

Stéphane Landelle

unread,
Jun 1, 2012, 1:47:09 AM6/1/12
to gat...@googlegroups.com
Hello Paul,

What is your simulation.log file size, please? Could you share it somehow (dropbox, GoogleDrive)?

You can increase your heap size in the gatling.sh/.bat file.
Also note that you can re-generate the reports from an existing simulation.log (so you don't have to re-run the simulation): use the -ro option:

Cheers,

Stephane

2012/6/1 Paul Langeard <agp...@gmail.com>

Paul Langeard

unread,
Jun 4, 2012, 5:30:27 AM6/4/12
to Gatling User Group
Thanks,
I have increase these values and it works.

-- JAVA_OPTS="-server -XX:+UseThreadPriorities -
XX:ThreadPriorityPolicy=42 -Xms512M -Xmx512M
++ JAVA_OPTS="-server -XX:+UseThreadPriorities -
XX:ThreadPriorityPolicy=42 -Xms2048M -Xmx2048M

--
Paul

On 1 juin, 07:47, Stéphane Landelle <slande...@excilys.com> wrote:
> Hello Paul,
>
> What is your simulation.log file size, please? Could you share it somehow
> (dropbox, GoogleDrive)?
>
> You can increase your heap size in the gatling.sh/.bat file.
> Also note that you can re-generate the reports from an existing
> simulation.log (so you don't have to re-run the simulation): use the -ro
> option:https://github.com/excilys/gatling/wiki/Configuration#wiki-cli-options
>
> Cheers,
>
> Stephane
>
> 2012/6/1 Paul Langeard <agpa...@gmail.com>

Stéphane Landelle

unread,
Jun 4, 2012, 5:35:08 AM6/4/12
to gat...@googlegroups.com
Great news!

I'm currently working on decreasing the charts generation memory footprint.
Could you tell me the size of your simulation.log file,please?

2012/6/4 Paul Langeard <agp...@gmail.com>

Sathishwaran Selvaraj

unread,
Apr 5, 2014, 3:12:31 AM4/5/14
to gat...@googlegroups.com, agp...@gmail.com
set -- JAVA_OPTS="-server -XX:+UseThreadPriorities - 

XX:ThreadPriorityPolicy=42 -Xms512M -Xmx512M 
++ JAVA_OPTS="-server -XX:+UseThreadPriorities - 
XX:ThreadPriorityPolicy=42 -Xms2048M -Xmx2048M 

From the above command please remove JAVA_OPTS = "-server
and keep it as
set -XX:+UseThreadPriorities - 

XX:ThreadPriorityPolicy=42 -Xms512M -Xmx512M 
++ JAVA_OPTS="-server -XX:+UseThreadPriorities - 
XX:ThreadPriorityPolicy=42 -Xms2048M -Xmx2048M"

and try running it should work :)

Thanks,
Sathish
Reply all
Reply to author
Forward
0 new messages