+3 votes
6.4k views
in Software Testing by (1.6k points)
When I am running my J meter script getting this error :

 

2015/10/25 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion  java.lang.OutOfMemoryError: Java heap space
2015/10/25 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion     java.lang.OutOfMemoryError: Java heap space
2015/10/25 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion  java.lang.OutOfMemoryError: Java heap space
2015/10/25 13:35:15 ERROR - jmeter.threads.JMeterThread: Error processing Assertion  java.lang.OutOfMemoryError: Java heap space
2015/10/25 13:35:16 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError: Java heap space
2015/10/25 13:35:17 ERROR - jmeter.threads.JMeterThread: Test failed!

When I am running script for 100 users then its happening although script is working for 2,3 users.

Please help!

2 Answers

+1 vote
by Expert (5.9k points)

This error comes when your java heap space is fully occupied so now you have to increase the heap allocation for JMeter.

Its very easy , You just have to follow these 2 steps :

1. There is a file in JMeter folder called jmeter.bat or jmeter.sh which is used to run jmeter, now you have to just use a parameter while launching jmeter . also you can change this parameter by editing this file.

JVM_ARGS="-Xms512m -Xmx512m" jmeter.sh

You can change this parameter as per your RAM, here it is 512m of your ram. you should use only 80% of your ram capacity.

2. The other thing to reduce this error is your script listeners they consume a good amount of memory so remove all listeners.

 

Now try with more users you won't get this error.

Not a Member yet?

Ask to Folks Login

My Account

Your feedback is highly appreciated