测试中,并发200,300,400人时,LR没报错,在并发500人时,LR报错”Action.c(56): Error -27791: Server "192.168.0.212" has shut down the connection prematurely“,同时查看WEB服务器日志:出现这样一条信息:
”INFO: Maximum number of threads (200) created for connector with address null and port 8081“
查看配置文件参数:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
采用的是默认配置,这样在高并发情况下肯定撑不住,所以修改参数配置如下:
<Connector port="8081" protocol="HTTP/1.1"
maxThreads="500" acceptCount="500" connectionTimeout="20000"
redirectPort="8443" />
重新测试,事物全部成功,系统也未报错。
出现”Action.c(56): Error -27791: Server "192.168.0.212" has shut down the connection prematurely“的原因即有可能是操作系统网络线程最大连接数设置太小的原因,也可能是应用软件的原因,当出现问题,随时查看系统日志,能帮助我们更快的定位问题。
转载原文:https://blog.youkuaiyun.com/jackyangyang/article/details/50857725