问题
In JMeter I am getting this error.
jmeter.JMeter: Uncaught exception: java.lang.OutOfMemoryError: Java heap space
Please let me know how to resolve.
回答1:
Increase the JMeter heap memory
- Within your explorer find where you installed JMeter
- Open up the bin directory.
- Find the
JMeter.batfile and open it with a text editor - Find the following
set HEAPYou can set this
HEAPvalue to whatever you like, in this example I've said allocate 2 GB of memory from the start and throughout the test run:set HEAP=-Xms2048m -Xmx2048m
回答2:
Have you considered adding another load generator? Even if you get to 80% of your pool you are going to have testbed influences on your result set. This, by the way, is tool independent.
Recommended best course is at least three load gens. Two for primary load and one for a control set of a single business process of each type. If all degrade together then you know with high certainty that you have a common issue, app degradation. If your primary degrade but not your control then you have overloaded generators. It's best you catch them rather than using bad data to make a decision on scalability that could result in chasing engineering ghosts in your code.
来源:https://stackoverflow.com/questions/26751940/outofmemoryerror-in-jmeter