I'm getting heap size errors when working with my test plan. I'm not executing it - these errors occur when doing the following:

  1. do a search for a string within the test plan
  2. copy or move http requests to a new Controller

The latter issue is slowing progress, since after making a recording I need to move elements around. I've lost more than one recording when the heap size error occurs. After the message appears, JMeter is effectively broken - it will be unresponsive and although it can be interacted with, it's useless since heap usage is at max and doesn't reduce even after an hour or more. If I crash out of the application, I am left with a broken jmx, where data has not been written properly.

For doing correlation, I am unable to do a search and replace, since searching quickly maxes out memory. For this I instead use Notepad++

I've got JMeter 5.5 and running Java 17. I use the BZM Correlation Recorder to make the recording (I don't use the recorder functionality to correlate anything, since it quickly became clear there are too many requests). I am running on a Windows 10 VM with 16BG of memory. I have set the heap size using file 'setenv.bat' under bin folder with following: set HEAP=-Xms1g -Xmx10g -XX:MaxMetaspaceSize=256m

I did initially try this at max of 12GB but this was also causing problems with the VM.

To mention, the test plan is around 16MB. It has a lot of http requests (around 3000). The reason for this large number is that we're testing a mapping service and emulating a user session results in hundreds of requests. Unsure if I am missing anything obvious to prevent this happening but happy to try anything at this point! Cheers Dan

1 Answer 1


It sounds like a bug in JMeter. First of all try upgrading to JMeter 5.6.2 (or whatever is the latest version which is available at JMeter Downloads page) as it's recommended to always use the latest version of JMeter.

If the behaviour is reproducible - raise an issue in JMeter Github. It would be good if you could take a heap dump and ensure that the issue is in JMeter and not in one of the plugins.

In the meantime you can work it around by splitting your huge script into smaller parts using Include Controllers and check whether there are duplicate samplers or sampler groups which can be moved to Module Controllers.

  • Thanks Dmitri - it seems this was a bug with JMeter or a plugin. After upgrading (and making a plugin change), I am now able to manipulate the test plan with no issues at all and minimal impact to heap size. Once I've had some time to investigate, I will raise an issue in the appropriate GitHub. Your point about breaking script into modular parts is also appreciated
    – DanUK
    Aug 24, 2023 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.