Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

connect() to unix:/var/run/php/php7.2-fpm.sock failed (11: Resource temporarily unavailable)

Tags:

I have a question about nginx. I have some webservers on my environment using nginx and they are behind Load balancer. Suddenly, all web services are down and I found this error log on nginx:

[error] 7097#7097: *44471950 connect() to unix:/var/run/php/php7.2-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: *.web.com, request: "HEAD /3.1?language=id&app=ios HTTP/1.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "web01.com"

Can anybody help me?

like image 931
stupidoes Avatar asked Sep 28 '18 10:09

stupidoes


1 Answers

Please check Below Value, Default must be 128.

sysctl net.core.somaxconn

Increase this value by running the following command.

echo "net.core.somaxconn=65536" >> /etc/sysctl.conf
sysctl -p

Then restart PHP-FPM to take effect of new changes (Depends on Version of PHP-FPM).

service php-fpm restart 
service php7.2-fpm restart
like image 75
SAB Avatar answered Nov 15 '22 00:11

SAB