TCP 连接数打满 ulimit 1024 为什么新连接还是失败

陆零云 33 0
压测到 4.2 万 QPS 时,客户端开始成片 connect timeout。服务端 ss -s 显示 total 5.1 万,TIME_WAIT 3.8 万,ESTAB 1.2 万。ulimit -n 在登录 shell 里是 65535,看着没问题。 看进程自己的限制才对。cat /proc/$(pidof php-fpm)/limits,Max open files 那行是 1024。服务是 systemd 拉起来的,limits.conf 只对登...