JMeter:运行“许多”线程时出现javax.net.ssl.SSLException

问题描述

timeStamp,已过去,标签,responseCode,responseMessage,threadName,dataType,成功,failureMessage,字节,sentBytes,grpThreads,allThreads,URL,延迟,空闲时间,连接

1600278792845,6688,Category page,Non HTTP response code: javax.net.ssl.SSLException,Non HTTP response message: Connection reset,10.0.4.22-Thread Group 1-1619,text,false,Test Failed: code expected to match /200/,3985,1830,https://<my-test-url>,148

我正在从具有三个从属节点的主服务器运行JMeter测试。如果使用的线程数较少(即〜200),则测试运行时不会出现任何错误。但是,如果我将线程数增加到〜300,则我的.jtl文件中开始出现上述错误消息。什么意思?

如果我在单个从属节点上运行1000个线程(仍从主节点执行),则不会出错。

一些想法:

  • 如果奴隶,我会期望一个java.lang.OutOfMemoryError异常 节点本身无法运行这么多线程。
  • 这些测试是在Azure环境中执行的,因此我不认为这是网络问题,因为Azure应该能够处理这种流量

系统信息:

  • 在所有计算机上的Ubuntu 18.04
  • Java 8
  • JMeter 5.0

解决方法

  1. 首先,请确保检查您的应用程序日志,因为它可能表明被测系统存在问题。如果您确定自己的应用程序运行正常,则可以考虑遵循JMeterSocketClosed Wiki页面上的建议
  2. If I run 1000 threads on a single slave node (still executed from the master node),I get no errors.-检查吞吐量(每秒的命中数),因为单个节点可能缺乏资源并且无法足够快地发送请求,因此当您在分布式模式下运行900个线程时,您的行为会更高吞吐量。要检查的图表是Transactions per SecondServer Hits per Second
  3. I would expect a java.lang.OutOfMemoryError exception if the slave node(s) itself couldn't run this many threads.-不一定,由于过多的garbage collection
  4. ,JMeter可以更慢地执行请求
  5. 考虑升级到JMeter 5.3(或JMeter Downloads页上提供的最新稳定版本),因为您可能会遇到JMeter问题,该问题已得到解决,as per JMeter Best Practices you should always be using the latest version of JMeter