解决Nginx: Cannot assign requested address for upstream
背景:在使用jmeter压测一个spring boot项目时,jmeter请求路径是一个nginx地址,nginx后面是spring gateway网关,网关后面是我的应用服务器,50并发,当压测到2分钟的时候,linux资源出现端口不够用的情况,导致jmeter的错误了上升到5%左右,查看nginx的日志后出现如下错误日志:
[crit] 12889#0: *32401195 connect() to 127.0.0.1:80 failed (99: Cannot assign requested address) while connecting to upstream 解决办法: 增加linux的可用端口区间 #sysctl -w net.ipv4.ip_local_port_range="15000 64000" 参考资料 https://ma.ttias.be/nginx-cannot-assign-requested-address-for-upstream/
相关推荐
singebogo 2020-09-23
84226432 2020-08-19
Cherishyuu 2020-08-19
TesterJingel 2020-08-18
登峰小蚁 2020-08-01
Cherishyuu 2020-07-28
84226432 2020-07-05
89421478 2020-07-05
HappinessCat 2020-07-05
TesterJingel 2020-06-28
singebogo 2020-06-27
TesterJingel 2020-06-26
Seleton 2020-06-26
xinjing0 2020-06-25
Cherishyuu 2020-06-25