JMeter – Out of memory error

Are you getting “out of memory” error in JMeter while executing your tests?

This is most likely because of heap size. Your heap memory allocated to JMeter may be too less. By default this set to 512 MB. This setting is available in jmeter.bat file as shown below.

  • set HEAP=-Xms512m -Xmx512m
If increasing the heap size does not solve the problem, you may need to look into your scripts and remove unnecessary listeners. Some listeners are memory intensive like “View results in Tree”. As a best practice you should remove this once your script is ready for execution and only used while debugging the script.
Also, try to minimize the number of request in one Test Plan. Having everything in one Test Plan is not recommended unless the scenario requires you to do. In that case have very high end machine with good RAM.

One comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.