# Gatling heap dump error

**URL:** <https://community.gatling.io/t/gatling-heap-dump-error/6038>\
**Category:** Gatling (Open-Source)\
**Created:** [March 30, 2021, 4:18am UTC](https://community.gatling.io/t/gatling-heap-dump-error/6038 "2021-03-30T04:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sri\_Harsha\_G](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Sri\_Harsha\_G](https://community.gatling.io/u/Sri_Harsha_G)\
**Post date:** [March 30, 2021, 4:18am UTC](https://community.gatling.io/t/gatling-heap-dump-error/6038/1 "2021-03-30T04:18:16Z")

</div>

I am using gatling gradle plugin with following jvm settings  
jvmArgs = [’-server’, ‘-Xmx4G’,  
‘-XX:+UseG1GC’, ‘-XX:MaxGCPauseMillis=30’,  
‘-XX:G1HeapRegionSize=16m’,  
‘-XX:InitiatingHeapOccupancyPercent=75’,  
‘-XX:+ParallelRefProcEnabled’,  
‘-XX:+PerfDisableSharedMem’,  
‘-XX:+AggressiveOpts’,  
‘-XX:+OptimizeStringConcat’,  
‘-XX:+HeapDumpOnOutOfMemoryError’]

I still get the following error  
ava.lang.OutOfMemoryError: Java heap space Dumping heap to java\_pid18123.hprof … Heap dump file created [6748925284 bytes in 342.311 secs] Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “channel-receiver-mux2-inout-receive” Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “channel-receiver-mux3-inout-receive” Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “channel-receiver-mux0-inout-receive” Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “channel-receiver-mux1-inout-receive” Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “java-sdk-http-connection-reaper” Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “gatling-1-3” Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “gatling-1-5”

Couple of questions

1. Does gatlng create any heap dump file and store it or is it created by JVM… I am sorry if this question is invalid.

2. Can I increase ‘-Xmx4G’, to 6-8G…

Thanks  
Sriharsha

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [March 30, 2021, 4:33pm UTC](https://community.gatling.io/t/gatling-heap-dump-error/6038/2 "2021-03-30T16:33:21Z")

</div>

You’re storing too much data in memory.  
Possible causes:

- you’re forcing huge large feeders in memory with “eager”

- you’re loading huge feeder data with “readRecords”

- you’re saving lots of data in virtual users’ Sessions with saveAs

- you’re using throttle but are injecting way too many virtual users for your throttle (see[throttling doc](https://gatling.io/docs/current/general/simulation_setup/#throttling)).
