Search code examples
gatlingscala-gatling

Gatling scripts are getting aborted with error "Process exited with an error: 137"


I am trying to run the performance test in parallel for different services for 4 hours but the flow is getting aborted with in 1 hour and throwing out of memory error. After sometime it is throwing Out of memory , heap memory errors

Errors: Uncaught error from thread [GatlingSystem-akka.actor.default-dispatcher-4]: GC overhead limit exceeded, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[GatlingSystem] java.lang.OutOfMemoryError: GC overhead limit exceeded

tried approaches:updated jvm args in pom.xml

<jvmArg>-Xms512m</jvmArg>
 <jvmArg>-Xmx12048m</jvmArg>

Can some please suggest any approach to how to run Gatling test without eating up memory and help in running test for longer duration with different services


Solution

  • First, you don't provide your version of Gatling. If you're using an old one, the first thing to do is upgrading (latest version is 3.4.1 as of now).

    Then, you don't describe what you do in your test and what causes this OOME.

    The most common cause is that your system under load can't withstand the load you're throwing at it. In this case, response times increase (possibly timing out), which increases the time virtual users take to complete their scenario/journey. As new users keep on arriving if you're using an open workload model (which you probably should), virtual users keep on piling up in memory without having a change to complete.

    In short, you have an issue and increasing memory won't fix it. You either have to fix you application to withstand such load, or reduce your load if you've been too ambitious there.