编程语言
首页 > 编程语言> > java-JMeter的JVM在10分钟后崩溃

java-JMeter的JVM在10分钟后崩溃

作者:互联网

我正在将JMeter与10个奴隶一起使用.执行10分钟后,Java崩溃:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000051c39ea0, pid=2488, tid=0x0000000000000ac0
#
# JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x69ea0]
#
# Core dump written. Default location: C:\apache-jmeter-3.1\bin\hs_err_pid2488.mdmp
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#  
VM Arguments:
jvm_args: -XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx3276m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50 -XX:MaxTenuringThreshold=2 -XX:+CMSClassUnloadingEnabled 
java_command: ApacheJMeter.jar
java_class_path (initial): ApacheJMeter.jar
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Amazon\cfn-bootstrap\
USERNAME=XXX
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 85 Stepping 4, GenuineIntel

由于OutOfMemoryError,最近我不得不为所有从属服务器和服务器计算机增加Java堆大小.
所有10个从属都具有4GM RAM,服务器计算机具有16GM RAM.
当前的JMeter设置为:HEAP = -Xms512m -Xmx3276m

解决方法:

您正在使用Java 8,但仍使用旧的JMeter 3.1版本,

请尝试使用最新的Version 5.0,这是JMeter best practices中第一个列出的,对于您的问题,请尽可能减少资源:

  • Use non-GUI mode: jmeter -n -t test.jmx -l test.jtl
  • Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
  • Don’t use “View Results Tree” or “View Results in Table” listeners during the load test, use them only during scripting phase to debug your scripts.
  • Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. [The Include Controller does not help here, as it adds all the test elements in the file to the test plan.]
  • Don’t use functional mode
  • Use CSV output rather than XML
  • Only save the data that you need
  • Use as few Assertions as possible
    Use the most performing scripting language (see JSR223 section)

标签:jmeter,jvm-crash,java,crash
来源: https://codeday.me/bug/20191108/2008553.html