This happens because the operating system rejects nginx’s attempts to connect to a unix socket.
The reason is either the maximum number of socket connections or the maximum number of unhandled socket connections has been exceeded.
Checking the limits:
sysctl net.core
We are interested in the lines:
net.core.somaxconn = 128
net.core.netdev_max_backlog = 200
Because of them, an error occurs, since the maximum number of connections is 128 and the maximum number of unprocessed is 200
Change the limits, write the lines in the / etc / sysctl.conf file
nano /etc/sysctl.conf
add
net.core.somaxconn = 20000
net.core.netdev_max_backlog = 65535
Apply parameters
sysctl -p
Restart php-fpm
service php-fpm restart
Để lại một bình luận