【问题标题】:JMeter httpclient.timeout property not workingJMeter httpclient.timeout 属性不起作用
【发布时间】:2021-04-06 01:13:49
【问题描述】:

继续处理此问题 - JMeter test not stopping after duration ends in distribution mode

使用 JMeter 版本 - 5.4

我得到了一个线程转储,发现很少有线程卡在 HTTP 请求上。

解决的办法是为这里提到的 HTTP 请求设置超时 - Configuring response timeout in Apache JMeter

但我不是测试计划的作者。因此,我可以使用的唯一方法是设置 JMeter 属性。 我在 jmeter.properties 中设置了以下内容(值用于本地测试):

httpclient.timeout=100
hc.parameters.file=hc.parameters
os_sampler.poll_for_timeout=100

在 hc.parameters 中

http.socket.timeout$Integer=100

但不幸的是,这些都不起作用。

唯一有效的超时是我在测试计划的 HTTP 采样器的高级选项卡中设置的超时。

我们是否有任何平台推荐来控制这种行为(如其他一些设置或属性等)?还是我在上述属性中遗漏了什么?

此外,我有时会收到此异常作为响应,但我非常怀疑这是否相关?

Non HTTP response code: java.net.BindException
Non HTTP response message: Address already in use: connect

【问题讨论】:

    标签: jmeter jmeter-5.0


    【解决方案1】:

    您的步骤是正确的,所以它看起来像 JMeter 中的一个错误,可能是 this commit 的副作用,所以您有 2 个选项:

    1. 降级到JMeter 5.0,此功能仍然有效
    2. Raise an issue in JMeter Bugzilla 但您需要等到有人修复它,然后才能进行夜间构建或包含此修复的新版本
    3. Fix it yourself and contribute the fix to the upstream

    【讨论】:

      猜你喜欢
      • 2014-12-06
      • 1970-01-01
      • 2016-02-06
      • 1970-01-01
      • 2011-03-31
      • 2018-11-19
      • 2012-07-23
      • 2016-07-16
      • 2020-01-24
      相关资源
      最近更新 更多