Showing posts with label Jmeter Heap Error. Show all posts
Showing posts with label Jmeter Heap Error. Show all posts

Thursday, January 17, 2013

Jmeter heap error or java.lang.outofmemory error..

In previous posts, i wrote about, how we can remove the heap error or java.lang.outofmemory error in Jmeter. Recently when i was performing performance testing of a web based application, even after doing all settings to remove heap error, i got this error. I was wondered, why this error occurred again, when i was done with necessary changes to the properties files in jmeter.

I checked the script again, but no solution was there. Then i rechecked the properties file, and there i came across to know that we do need to change the properties in jmeter report.bat file too. Because if the heap size in report remain same means less, it will cause problem when we will run test for large number of users.
So do the changes in Jmeter-report.bat file.





As you can see the image, it is after updating the properties.

Also if you dont want to see this king of error, run jmeter in non-gui mode.

My next post will be on the same.

Monday, May 28, 2012

Jmeter Heap Error!

Hi All!  
        
While using Jmeter, it is not always like you record script, provide number of threads, add listeners and run the script. I am saying this because so many time when we try run our test, we face some error not all the time but some time when we increase the number of threads. This is usually caused by including memory intensive listeners in your stress test. Listeners like "View Tree Results" are useful for debugging your test, but they are too memory intensive to remain in your test when you ramp up the number of simulated users and iterations. The best listeners to use for a long-term, high-load test are Aggregate Listener, Graph Listener, and Spline Listener.
Here is the image of that particular section where you will find the area where you can make changes to reduce the heap error.
To go to this area, Go to the" Jmeter" folder where you have copied that. Then explore this folder and open "jmeter.bat" with notepad, and find the area mentioned in the image:










Now as you can see in the above image, the heap size, new heap size. Now one important thing, is if you want to test your web application with more that 500 users and your system configuration is only 512 MB Ram or your have 1000 users or more that that and you have 2 GB m/c so it is going to little bit tough for you to run your load test.
Because if a m/c with 2GB ram can generate 1000 user max. Rest your application will get choked because of m/c's slowness. 
Heap size is depends upon your system configuration. So if you have 2GB m/c then increase your heap size to 1024-1024m or 512-1024m, according have much free space you have in your m/c.

You can make changes directly from the area mentioned in the image.

And one most important thing, do not put max load at first instance. First check the behavior of your m/c with less number of users.

Enjoy your load test with Jmeter.   :)