java.lang.OutOfMemoryError: Java heap space

836 views
Skip to first unread message

Dor Levy

unread,
Sep 11, 2014, 11:21:16 AM9/11/14
to gat...@googlegroups.com
hi All,
have someone got this error before?

below is the full error log from terminal:

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid2384.hprof ...
Heap dump file created [6473628825 bytes in 90.660 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2219)
        at java.util.ArrayList.grow(ArrayList.java:242)
        at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:216)
        at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:208)
        at java.util.ArrayList.add(ArrayList.java:440)
        at au.com.bytecode.opencsv.CSVParser.parseLine(CSVParser.java:250)
        at au.com.bytecode.opencsv.CSVParser.parseLine(CSVParser.java:178)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$$anonfun$apply$2$$anonfun$1.apply(SeparatedValuesParser.scala:45)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$$anonfun$apply$2$$anonfun$1.apply(SeparatedValuesParser.scala:45)
        at scala.collection.Iterator$$anon$19.next(Iterator.scala:401)
        at scala.collection.Iterator$$anon$19.next(Iterator.scala:401)
        at scala.collection.Iterator$class.foreach(Iterator.scala:772)
        at scala.collection.Iterator$$anon$19.foreach(Iterator.scala:399)
        at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
        at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:102)
        at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:250)
        at scala.collection.Iterator$$anon$19.toBuffer(Iterator.scala:399)
        at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:237)
        at scala.collection.Iterator$$anon$19.toArray(Iterator.scala:399)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$$anonfun$apply$2.apply(SeparatedValuesParser.scala:48)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$$anonfun$apply$2.apply(SeparatedValuesParser.scala:42)
        at com.excilys.ebi.gatling.core.util.IOHelper$.use(IOHelper.scala:22)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$.apply(SeparatedValuesParser.scala:42)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$.csv(SeparatedValuesParser.scala:30)
        at com.excilys.ebi.gatling.core.feeder.csv.SeparatedValuesParser$.csv(SeparatedValuesParser.scala:29)
        at com.excilys.ebi.gatling.core.Predef$.csv(Predef.scala:36)
        at pocket_avatar_load_test.getUser.<init>(getUser.scala:25)
        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:526)
        at java.lang.Class.newInstance(Class.java:374)



any advice? i'm pretty stuck here
Thanks
Dor

Dor Levy

unread,
Sep 11, 2014, 11:22:36 AM9/11/14
to gat...@googlegroups.com
BTW i have increased Xms to 512M & Xmx 4096M

Pierre DAL-PRA

unread,
Sep 11, 2014, 11:25:10 AM9/11/14
to gat...@googlegroups.com
Hi,

Looks like your using one hell of a big CSV file as a feeder...
What does it looks like ?

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stéphane Landelle

unread,
Sep 11, 2014, 11:29:46 AM9/11/14
to gat...@googlegroups.com
+1 for knowing the size of your file.

Then, you should consider migrating to Gatling 2 release candidates. We no longer use an Array but a Vector for this (so we don't need consecutive memory to store the whole feeder data).

Dor Levy

unread,
Sep 11, 2014, 12:06:14 PM9/11/14
to gat...@googlegroups.com
the csv file is not that big ~22MB.
how difficult it is to migrate to Gatling 2 RC? 

You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/AoJCl1KM-kg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

תודה

דור

Stéphane Landelle

unread,
Sep 11, 2014, 12:10:39 PM9/11/14
to gat...@googlegroups.com
Insanely complex.
But we documented it for the sheer fun of writing documentation: http://gatling.io/docs/2.0.0-RC4/project/migration_guides/1.5.x-to-2.0.0-RC3.html
Reply all
Reply to author
Forward
0 new messages