0

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

3
  • 1
    That's just a guess, but could you change whatever program is listening to that /var/php/streamer.sock to call listen(2) with a larger backlog argument? Commented Oct 1, 2021 at 9:12
  • Look for listen.backlog in php-fpm.conf and see if setting it to something larger fixes that issue. Maybe you're lucky ;-) Commented Oct 1, 2021 at 9:25
  • About Uncle Billy's setting, ss -lxn src == /var/php/streamer.sock should 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) Commented Oct 1, 2021 at 11:16

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.