Quality Testing

Quality is delighting customers

Getting Java.Lang.OutofMemory Error:Java Heap space error for large volume of data


 I am getting Java Heap space error while running the script for the below test plan

No of threads =48

Ramp up   =0

Duration 15 minutes-Continuously running the script for 15 minutes with delay of 20 sec


For the above test plan,i have recorded the script for a scenario which have large volume of data(33K data) and executed the script.But i got Java.Lang.OutofMemory Error:Java Heap space error.I also tried running in the non GUI mode but got the same error.Is there any solution for this?

Kindly help me on this.


Surendran S

Views: 228

Reply to This

Replies to This Discussion

You need to increase Java Heap space available for JMeter to be something like 60-70% of your total available physical RAM

  1. Open JMeter startup script (jmeter.bat or jmeter.sh file depending on your operating system) with your favourite text editor
  2. Locate the next line: HEAP="-Xms512m -Xmx512m"
  3. Increase the right part to allocate more memory to JMeter, for example for 4 gigabytes use HEAP="-Xms512m -Xmx4g"
  4. Restart JMeter to pick the change up
  5. Your problem should go away. 

Going forward make sure you're following JMeter Best Practices and tips from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure guide. 


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service