I recorded a scenario using the gatling recorder which produced a script with 2 chains and each chain containing about ~ 50 requests. When I try to run the scenario I am presented with some compilation error which is printed across the entire screen length with not much information about the error (that I can comprehend).
If I cut down one chain and limit the number of requests in other chain to about ~35 the script works fine. But moment I add any more requests I am presented with the compile error again. I also increased the stack to -Xss=100M but that does not resolve the issue.
Any leads into what may be happening??? I can try to break one script into multiple scenarios (say each has about ~20 requests), and the master scripts calling all these scenarios. Would this help?
Yes, this is a matter of stack size when compiling you scenario.
We split long scenarios into 100 element chains (requests and pauses), but it doesn’t seem to be enough in your case.
This easiest way to fix this is indeed to increase the stack size. What you missed is that we fork a new process for running the compiler, so you probably didn’t set it up on the right one.
You have to set it up in gatling.conf file:
PS: Would it be possible to get you generated scenario, so we can investigate and maybe decide to lower the split limit, please?
Thanks for the quick response. Yes its a stack overflow issue. However, as suggested by you, I did increase the stack size (-Xss400M) for the complier in gatling.conf and tried running the long scenario script but I was still presented by the same buffer overflow.
I got it working by splitting the scenario into multiple chains ( ~ 20 requests ) and creating one scala scenario file for each chain. Then the master script clubs all these scenario into the master scenario and executes. This is similar to the advanced simulation example included in the gatling package. Or model the long scenario by splitting the chains ( ~30 requests ) into objects within a single file, followed this example (https://github.com/excilys/gatling-hands-on/blob/master/gatling-hands-on-demo/src/test/scala/computerdatabase/Step01.scala). Not sure if this is something which can be implemented in the recorder on generating scripts for long scenarios.
I will try to create a separate long scenario for you on a different application as I am currently using a commercial web application under production.
I thought you increase the stack size of the main JVM, not the forked one.
Weird that increasing the stack size in gatling.conf didn’t fix the problem.
If you want, you can obfuscate all urls and parameters, they don’t really matter. What matters is the complexity and the length of the scenario.