When try to run jMeter with 50 or more user it gives OutOfMemoryError:
2013/12/18 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion java.lang.OutOfMemoryError: Java heap space
2013/12/18 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion java.lang.OutOfMemoryError: Java heap space
2013/12/18 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion java.lang.OutOfMemoryError: Java heap space
2013/12/18 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion java.lang.OutOfMemoryError: Java heap space
2013/12/18 13:35:16 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError: Java heap space
2013/12/18 13:35:17 ERROR - jmeter.threads.JMeterThread: Test failed!
I tried to increase the heap size but still getting the same error.
Even i tried to remove all the listeners but nothing changed.
If you look carefully you will space between -Xmx and 1800M, which is causing "Could not create the Java virtual machine: Invalid maximum heap size -Xmx". syntactically there should not be any space between -Xmx and heap size. Just remove the space between -Xmx and 1400M and it will work.
bat/sh ). HEAP=-Xms512m –Xmx512m. It means default allocated heap size is minimum 512MB, maximum 512MB. Configure it as per you own machine configuration. It should also be kept in mind that OS also need some amount of memory, so all of the physical RAM shouldn't be allocated.
1.1. Because JMeter uses only standard Java APIs, please do not file bug reports if your JRE fails to run JMeter because of JRE implementation issues. Although you can use a JRE, it is better to install a JDK as for recording of HTTPS, JMeter needs keytool utility from JDK.
It looks like that you're just lacking Java Heap Space. It's normal as JMeter by default has a very low heap allocation. It's controllable via -Xmx
parameter.
There is a line in jmeter.bat
or jmeter.sh
script which recommends launching JMeter as
JVM_ARGS="-Xms512m -Xmx512m" jmeter.sh
You can try increasing maximum heap until you'll stop receiving these errors. I'd recommend to set it to something like 80% of your hardware RAM.
Also consider JMeter Performance and Tuning Tips article to make sure that you disable memory-consuming listeners, don't overscript, use post-processors efficiently, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With