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, July 16, 2012

Jmeter result:

To learn about jmeter results(Summary Report, View Result Tree  ETC.) follow:
           http://jmeterresults.blogspot.in

Wednesday, July 11, 2012

Uncaught exception java.lang.outofmemoryerror:

Most of you will be familiar with this error. I am not going with other java problems. I am only concerning with jmeter related problem, and when i was running load test for a web-app with 1500 virtual users, jmeter gave this error. "uncaught exception java.lang.outofmemoryerror:".













In the previous post "http://www.blogger.com/blogger.g?blogID=8863051106567046425#editor/target=post;postID=8667267162068998059"  i talked about heap error and how to solve that problem. But now when when all the setting were correct as well as heap size too i found a new error in jmeter.
This error causes because stack size. Stack size depends upon your cookies and cache in jmeter.
I will just tell you how we can solve that problem.








As you can see in the above image, the set heap size section. When you will open this by editing jmeter.bat file, you will not see the "-Xss64k" section  there.
So to remove the "uncaught exception java.lang.outofmemoryerror: " error just add this section to your jmeter.bat file. Also you can increase the size of stack till 100k as per your system and jmeter behavior

I hope this post will help you threw this..

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.   :)