加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

jmeter压测配置

发布时间:2020-12-14 02:00:23 所属栏目:Windows 来源:网络整理
导读:windows上面修改最大使用端口数和time_await等待时间 注册表需要添加两个配置,位置: HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters ? MaxUserPort :65534 TcpTimedWaitDelay:30 ? 然而这么配置了之后,压测一段时间任

windows上面修改最大使用端口数和time_await等待时间

注册表需要添加两个配置,位置:
HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters

?

MaxUserPort :65534

TcpTimedWaitDelay:30

?

然而这么配置了之后,压测一段时间任然会有connect use错误提示出现,怀疑是jmeter没有重用keep alive,官方配置发现有三个配置参数比较可疑:

# Idle connection timeout (Milliseconds) to apply if the server does not send
# Keep-Alive headers (default 0)
# Set this > 0 to compensate for servers that don‘t send a Keep-Alive header
# If <= 0,idle timeout will only apply if the server sends a Keep-Alive header
httpclient4.idletimeout=10000

# Check connections if the elapsed time (Milliseconds) since the last
# use of the connection exceed this value
httpclient4.validate_after_inactivity=0

# TTL (in Milliseconds) represents an absolute value.
# No matter what,the connection will not be re-used beyond its TTL.
httpclient4.time_to_live=0
?
这么调整了配置之后还是不靠谱,jmeter.properties,user.properties这两个文件都修改过,任然有错误出现。
?
?
最好在官方发现这么一段话:
Use KeepAlive
?
JMeter sets the Connection:? keep-alive?header. This does not work properly with the default HTTP implementation,as connection re-use is not under user-control. It does work with the Apache HttpComponents HttpClient implementations.
?
怀疑是jmeter使用的client的问题,把Http Request->Advanced里面的Client Implement选择为Java之后,问题解决,1000并发跑了好久都没有出错?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读