nignx:maximum number of descriptors supported by select() is 1024 while connecting to upstream

it2025-09-04  6

文章目录

背景问题解决方式

背景

测试在用jmeter进行压力测试,在并发量高的时候,出现接口时而正常时而失败的情况。并发量低没有问题。 版本:window

问题

nginx log报错: maximum number of descriptors supported by select() is 1024 while connecting to upstream maximum number of descriptors supported by select() is 1024 while waiting for request

解决方式

首先看一下nginx.conf配置文件。网上搜索解决办法的时候:有人说 1.修改参数worker_connections 2.修改参数worker_rlimit_nofile 但是我本来就设置的65535,连接已经够大了。还是这个问题。 没有设置这个的小伙伴可以尝试一下。 下面着重看一下设置了依然同样问题是如何解决的?

解决 1.去官网下载新版本的nginx nginx for windows下载地址:http://nginx-win.ecsds.eu/download/ 我用的这个版本

2.解压后在服务器上面双击执行解压后的Tweak-Optimize tcpip parameters for nginx connections.reg文件。修改注册表连接数配置信息 3.将解压目录的nginx_basic.exe更名为nginx.exe,拷贝到服务器上替换相应的nginx.exe程序。(服务器需停掉nginx再操作)

转载自:https://blog.csdn.net/qq_38425803/article/details/108637547

补充,为nginx防止恶意压力测试服务器,以下做法可解决 http{}字段第一行添加: limit_conn_zone $binary_remote_addr zone=one:10m; server{}字段添加: limit_conn one 10;

最新回复(0)