Using Gatling 3.4.0 (latest) and trying to test a concurrent HTTP GET retrieving part of a large binary file (via Range request headers). I want to test 500+ concurrent requests for 1/10/100MB segments, but tests over 1MB segment size fail with OutOfMemory / Netty cannot allocate direct memory errors.
Looking through the Gatling code it appears to be caused by the way Gatling builds up the Response and ResponseBody objects, and even though I never want to introspect the response body bytes they are kept for the life of the request/response pair (and thrown away after checks etc by GC). It seems like ‘transformResponse’ exists to help customise the Response and ResponseBody and could help, but in this case that is too late as the tests run out of memory just building up the Response itself before ‘transform…’ is called.
I’m looking for an options/configuration to disable this behaviour, effectively tell Gatling “throw away the response body bytes when received for this request”, does such an option exist? Without it it seems like i’m stuck having to use some other framework for tests that result in large binary responses vs tests that receive smaller payloads.