2

Recently I run the load test of 5k users for 30 minutes using concurrency thread group. When I want to read file in the Graph Report listener, this out of memory error prompted on the cmd:

enter image description here

I tried to modify the heap size to 6GB in notepad++ (my laptop spec: 16GB DDR4, 512GB SSD, i5 7th gen, available ram 10GB):

enter image description here

But in the jmeter cmd screen, it does not shows the changes i made just now. how to exactly change the heap size? I tried to follow the steps already using notepad++ but seems not working for me. Anything that I missed out here? I followed the steps from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure by Blazemeter

enter image description here

emeraldgold07
  • 173
  • 3
  • 14
  • This line is a comment (start with `rem`) you need to write in a different line as https://stackoverflow.com/questions/2286750/jmeter-outofmemoryerror – Ori Marko Jul 29 '21 at 04:59

1 Answers1

2
  1. The easiest is setting HEAP environment variable like:

     set HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" && jmeter -n -t test.jmx
    
  2. In order to make the change permanent modify the line # 151 of jmeter.bat startup script

  3. Don't pay attention to the console message when you start JMeter in GUI mode, it's hard-coded and doesn't pick up any changes

  4. If you're following recommendation to increase the heap why don't you follow the recommendation to run the test in non-GUI mode?

More information: 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I just want to increase the heap to avoid the out of memory error. I got the error when i tried to read file in the jmeter listener (the result file which has been executed in non-gui mode) – emeraldgold07 Jul 30 '21 at 03:58