gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:32:04 27 4
gpt4 key购买 nike

我正在将 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)

关于java - JMeter 的 JVM 在 10 分钟后崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52603624/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com