java.lang.OutOfMemoryError: Java heap space after upgrading to 3.2.0


I just upgraded from Gatling 2.3.0 to 3.2.0 and now for the same job, the same configuration, I have java.lang.OutOfMemoryError: Java heap space errors as soon as I have more than 2 users in parallel. With the previous version I can run more than 150 users at the same time. The only change is the upgrade of version.

You can find the hprof file here :

It’s a big scenario, but it works fine with gatling 2.3.0.

It tried to increase Xms and Xmx but it still crashes.


You have a 1GB heap where 300MB are being used by some StringBuilders and CharBuffers Gatling recycles in a pool (8 entries ranging from 24MB to 58MB).
We could cap the size of what’s being pooled, but I have mixed feeling about this. I mean, you do have 24MB to 58MB payloads, so saving such allocations does help for sure!
I recommend increasing your heap size.