Jmeter java.lang.OutOfMemoryError: GC upper limit exceeded

I use Jmeter to load the workload into an application deployed on an AWS EC2 instance. The test should be very large: it lasts 10 hours, and the workload profile has bimodal forms with a step of about 2600 requests in 5 minutes. In fact, I have one instance of m3.xlarge in which the application is deployed, and 8 instances of m3.xlarge, each of which starts the jmeter instance. Using a python script, the workload for injection is shared between 8 client instances, so in the example, if the original workload is for entering 800 requests, each jmeter instance will enter 100 requests. The full test, as I said, lasts 10 hours and is divided into time intervals of 5 minutes each. Every 5 minutes a small change in workload is applied. In fact, I get the value java.lang.OutOfMemoryError from each jmeter instance: the upper limit of the GC exceeded the error immediately after running the test, and the request does not arrive in the application. I read a lot on the Internet and on stackoverflow, and I came to the conclusion that a possible error could be:

  • The JMV heap size is too small -> I decided to set the following in the jmeter.bat files in each jmeter instance:

    set HEAP = -Xms4g -Xmx4g

    set NEW = -XX: NewSize = 4g -XX: MaxNewSize = 4g

  • some errors in the code, which leads to continued unused use of the garbage collector. Therefore, I remove all jmeter listeners from my test. In particular, I used TableVisualizer, ViewResultsFullVisualizer, StatVisualizer and GraphVisualizer.

In any case, the problem persists. I really don't know how to solve it. I know that 10 hours of a test request for a 2600 feed can be a very difficult test, but I think there should be a way to accomplish this. I am using an EC2 m3.xlarge instance, so I could even increase the heap size to 8G if this can be useful, or share the workload among even more clients, since I use spot instances, so I won’t pay much more, but since I have already doubled the number of client instances from 4 to 8 to solve the problem, and does not work. I am a little confused and I want to know r suggestions before continuing to get more and more resources. Thank you so much in advance.

+6
source share
1 answer

Your heap settings do not look right: set HEAP = -Xms4g -Xmx4g set NEW = -XX: NewSize = 4g -XX: MaxNewSize = 4g

Your new value is equal to the size of the heap, this is wrong. First comment on the new part.

Can you make ps -eaf | grep java and show the result?

And check if you are following these recommendations:

Finally, give an overview of the test plan and the number of threads you started.

+5
source

Source: https://habr.com/ru/post/982935/


All Articles