简体   繁体   English

Jmeter java.lang.OutOfMemoryError:超出GC开销限制

[英]Jmeter java.lang.OutOfMemoryError: GC overhead limit exceeded

I'm using Jmeter to inject workload to an application deployed on an AWS EC2 instance. 我正在使用Jmeter将工作负载注入部署在AWS EC2实例上的应用程序。 The test has to be very huge: it lasts for 10 hours and the workload profile has a bimodal shapes with a pitch of about 2600 requests in 5 minutes. 测试必须非常庞大:它持续10个小时,工作负载配置文件具有双峰形状,在5分钟内有大约2600个请求。 Actually I have one m3.xlarge instance in which the application is deployed and 8 m3.xlarge instances each one running a jmeter instance. 实际上我有一个部署应用程序的m3.xlarge实例和每个运行jmeter实例的8个m3.xlarge实例。 With a python script the workload to inject is splitted among the 8 client instances so in example if the original workload as to inject 800 requests, each jmeter instance will inject 100 requests. 使用python脚本,要注入的工作负载在8个客户端实例之间进行分割,因此在示例中,如果原始工作负载要注入800个请求,则每个jmeter实例将注入100个请求。 The full test as I said lasts for 10 hours and is divided into timesteps of 5 min each. 我所说的完整测试持续10个小时,分为每个5分钟的时间步长。 Every 5 min a little workload variation is applied. 每5分钟应用一点工作负载变化。 Actually I get from each jmeter instance the java.lang.OutOfMemoryError: GC overhead limit exceeded error immediatly after the test is started and no request arrive to the application. 实际上,我从每个jmeter实例得到java.lang.OutOfMemoryError:GC开销限制在测试开始后立即超出错误并且没有请求到达应用程序。 I read a lot online and on stackoverflow, and I concluded the possible mistake could be: 我在网上和stackoverflow上阅读了很多内容,我总结出可能的错误可能是:

  • JMV heap size too low-> I solved setting the following in the jmeter.bat files in each jmeter instance: JMV堆大小太低 - >我解决了在每个jmeter实例的jmeter.bat文件中设置以下内容:

    set HEAP=-Xms4g -Xmx4g 设置HEAP = -Xms4g -Xmx4g

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

  • some mistakes in the code that results in a continue unuseful usage of the garbage collector. 代码中的一些错误导致继续无用的垃圾收集器。 So I remove from my test all the jmeter listeners. 所以我从测试中删除了所有的jmeter监听器。 In particular I was using TableVisualizer, ViewResultsFullVisualizer, StatVisualizer, and GraphVisualizer. 特别是我使用的是TableVisualizer,ViewResultsFullVisualizer,StatVisualizer和GraphVisualizer。

Anyway the problem persists. 无论如何问题仍然存在。 I really have no idea about how to solve it. 我真的不知道如何解决它。 I know 10 hours of test with 2600 pitch request could be a very heavy test, but I think there should be a way to perform this. 我知道用2600音调请求进行10小时测试可能是一个非常繁重的测试,但我认为应该有一种方法来执行此操作。 I'm using EC2 m3.xlarge instance so I could even raise the heap size to 8G if it could be useful, or splitting the workload among even more clients since I'm using spot instances so I will not pay so much more, but since I have already doubled the number of client instance from 4 to 8 in order to solve the problem and is doesn't work I'm a little bit confused and I want to know r suggestions before continue to get more and more resources. 我正在使用EC2 m3.xlarge实例,所以我甚至可以将堆大小提高到8G(如果它可能有用),或者将工作负载分配给更多的客户端,因为我使用的是spot实例,所以我不会付出这么多,但是因为我已经将客户端实例的数量从4增加到8,以便解决问题并且不起作用我有点困惑,我想知道r建议,然后继续获得越来越多的资源。 Thank you a lot in advance. 非常感谢你提前。

Your heap settings look wrong: set HEAP=-Xms4g -Xmx4g set NEW=-XX:NewSize=4g -XX:MaxNewSize=4g 您的堆设置看起来错误:设置HEAP = -Xms4g -Xmx4g设置NEW = -XX:NewSize = 4g -XX:MaxNewSize = 4g

Your new is equal to Heap size, this is wrong. 你的新等于堆大小,这是错误的。 Comment NEW part first. 先评论新部分。

Can you do a ps -eaf|grep java and show the output ? 你能做一个ps -eaf | grep java并显示输出吗?

And also check you respect these recommendations: 并检查您是否尊重这些建议:

Finally, show an overview of your Test plan and , number of threads that you start. 最后,显示您的测试计划和您开始的线程数的概述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java PreparedStatement java.lang.OutOfMemoryError:超出了GC开销限制 - Java PreparedStatement java.lang.OutOfMemoryError: GC overhead limit exceeded java.lang.OutOfMemoryError:在 Jmeter 负载测试期间超出 GC 开销限制 - java.lang.OutOfMemoryError: GC overhead limit exceeded during Jmeter load testing 詹金斯 java.lang.OutOfMemoryError:超出 GC 开销限制 - Jenkins java.lang.OutOfMemoryError: GC overhead limit exceeded java.lang.OutOfMemoryError:GC开销限制超出了android studio - java.lang.OutOfMemoryError: GC overhead limit exceeded android studio Gridgain:java.lang.OutOfMemoryError:超出了GC开销限制 - Gridgain: java.lang.OutOfMemoryError: GC overhead limit exceeded Spark失败了java.lang.OutOfMemoryError:超出了GC开销限制? - Spark fails with java.lang.OutOfMemoryError: GC overhead limit exceeded? SonarQube java.lang.OutOfMemoryError:超出了GC开销限制 - SonarQube java.lang.OutOfMemoryError: GC overhead limit exceeded Tomcat java.lang.OutOfMemoryError:超出了GC开销限制 - Tomcat java.lang.OutOfMemoryError: GC overhead limit exceeded java.lang.OutOfMemoryError:超出 GC 开销限制 - java.lang.OutOfMemoryError: GC overhead limit exceeded 超出Junit java.lang.OutOfMemoryError GC开销限制 - Junit java.lang.OutOfMemoryError GC overhead limit exceeded
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM