java.lang.OutOfMemoryError: Java heap space when Parsing log file

Hi,

I’m trying to build a custom protocol for gatling, and with my trivial ChainableAction implementation i get OOM

for the moment i simplified my action to just a Thread.sleep

case class TellAction(actor:ActorRef, message: Any, waitOn: Future[Any], actionName: String, override val next: Action, stats: StatsEngine)
  extends ChainableAction {

  override def name: String = actionName

  override def execute(session: Session): Unit = {

    println(">>>>>>>>>>>>>>>>>>>>>>>>sent message")
    val start = System.nanoTime() / 1000000
    Thread.sleep(300)
    val end = System.nanoTime() / 1000000
    stats.logResponse(session, actionName, start, end, OK, None, None)
    println("---------------------------------------- " + next.name)
    next ! session
  }

I run gatling with

jvmArgs = ['-Xms16000M', '-Xmx16000M', '-XX:+UseThreadPriorities', '-XX:+HeapDumpOnOutOfMemoryError' ]

via the gatling gradle plugin (https://github.com/lkishalmi/gradle-gatling-plugin)

given the above, i see in the console:

15:29:03.978 [main] INFO io.gatling.core.config.GatlingConfiguration$ - Gatling will try to use ‘gatling.conf’ as custom config file.
15:29:04.410 [GatlingSystem-akka.actor.default-dispatcher-3] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
15:29:05.830 [GatlingSystem-akka.actor.default-dispatcher-4] INFO io.gatling.core.stats.writer.LogFileDataWriter - Initializing
15:29:05.830 [GatlingSystem-akka.actor.default-dispatcher-2] INFO io.gatling.core.stats.writer.ConsoleDataWriter - Initializing
15:29:05.837 [GatlingSystem-akka.actor.default-dispatcher-2] INFO io.gatling.core.stats.writer.ConsoleDataWriter - Initialized
15:29:05.843 [GatlingSystem-akka.actor.default-dispatcher-4] INFO io.gatling.core.stats.writer.LogFileDataWriter - Initialized
Simulation loadtests.BasicSimulation started…

sent message
---------------------------------------- gatling-exit
15:29:06.254 [GatlingSystem-akka.actor.default-dispatcher-2] DEBUG io.gatling.core.action.Exit - End user #1
15:29:06.256 [GatlingSystem-akka.actor.default-dispatcher-2] DEBUG io.gatling.core.controller.inject.open.OpenWorkload - Start user #1
15:29:06.257 [GatlingSystem-akka.actor.default-dispatcher-2] DEBUG io.gatling.core.controller.inject.open.OpenWorkload - Injecting 1 users in scenario send order, continue=false
15:29:06.257 [GatlingSystem-akka.actor.default-dispatcher-2] INFO io.gatling.core.controller.inject.Injector - StoppedInjecting
15:29:06.258 [GatlingSystem-akka.actor.default-dispatcher-2] INFO io.gatling.core.controller.inject.Injector - All users of scenario send order are stopped
15:29:06.259 [GatlingSystem-akka.actor.default-dispatcher-2] INFO io.gatling.core.controller.inject.Injector - Stopping
15:29:06.259 [GatlingSystem-akka.actor.default-dispatcher-4] INFO io.gatling.core.controller.Controller - Injector has stopped, initiating graceful stop