【问题标题】:Jmeter Constant Timer Causing ErrorsJmeter 常量定时器导致错误
【发布时间】:2014-07-22 15:00:22
【问题描述】:

我设置了一个简单的 jmeter 测试,包含 150 个线程、一个 7 秒的恒定计时器和一个 http 请求。 如果我将常量计时器增加到 100 秒,那么 http 请求开始抛出错误。错误提示“非 HTTP 响应代码:org.apache.http.NoHttpResponseException,非 HTTP 响应消息:目标服务器未能响应”

有人遇到过吗?根本原因可能是什么?

【问题讨论】:

  • 连接是否超时?是否使用了keepalive?
  • 我正在使用http请求,据我所知,jmeter不允许http请求的keepalive。
  • 禁用keepalive或增加服务器限制,请重新运行。
  • 好的,我找到了 keepalive 设置。谢谢。但是,即使禁用“使用 KeepAlive”设置,我仍然会收到错误消息。

标签: timer jmeter


【解决方案1】:

您很可能遇到Connection Reset since JMeter 2.10 ?JMeter Wiki 页面中描述的问题。

启用重试

对于 HttpClient 4,在 user.properties 中设置:

httpclient4.retrycount=1 这将使 JMeter 重试一次。为了 HttpClient 3,在 user.properties 集中:

httpclient3.retrycount=1 这将使 JMeter 重试一次。

启用过时检查

对于 HC4 实施:

在 user.properties 中:

hc.parameters.file=hc.parameters 在 hc.parameters 集中:

http.connection.stalecheck$Boolean=true 对于 HC3 实施:

在 user.properties 中:

httpclient.parameters.file=httpclient.parameters 在 httpclient.parameters 设置:

http.connection.stalecheck$Boolean=true

请参阅Apache JMeter Properties Customization Guide 了解上述属性设置/覆盖的最合适选项。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多