Gatling session is holding too much of data that my scale test is throwing OutOfMemory exceptions and crashing

Hi,

I have a gatling script for a salesforce application where I have some session variables that I m putting it in session. Due to this the session is holding too much of data and occupying more heap.
After some 600 users my scale test would crash due to outofmemory exceptions.

How can i clear this session data after I use it or what is the alternative option to hold the captured data from any response?

According to documentation, if you don’t do checks on response bodies, they are discarded.
Alternatively you could allow the jvm to use more RAM if those checks are actually needed.
You could see an example here: http://gatling.io/docs/2.3/extensions/sbt_plugin (scroll to bottom of page)