I have a server with the following sysctl settings:
net.ipv4.ip_local_port_range = 1024 65535
net.core.netdev_max_backlog = 65535
net.ipv4.tcp_max_syn_backlog = 50000
net.ipv4.tcp_max_tw_buckets = 2000000
net.ipv4.tcp_fin_timeout = 15
net.core.somaxconn = 65535
Yet my nginx at peak traffic complains about connecting to my php-fpm unix sockets.
2021/09/30 17:06:24 [error] 1848498#1848498: *32855016 connect() to unix:/var/php/streamer.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 100.1.1.3
I can't find if I'm at maximum value possible or if it's possible to increase more, if I should change to TCP/IP or etc. All traffic to this server is served via another instance over wireguard so the client is always 100.1.1.3
Also a answer that shows how to know how much of those resources you are really using would sure help a lot of people googling about this
/var/php/streamer.sockto calllisten(2)with a largerbacklogargument?listen.backloginphp-fpm.confand see if setting it to something larger fixes that issue. Maybe you're lucky ;-)ss -lxn src == /var/php/streamer.sockshould display the values in use: backlog in Send-Q, "in the pipeline"/pending in Recv-Q. if Recv-Q > Send-Q, there's one or more connection(s) that can potentially fail. (those fields show different information on the LISTEN entry, normally it's about pending data , rather than pending connections)