stupidoes
stupidoes

Reputation: 61

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

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?

Upvotes: 6

Views: 10856

Answers (1)

SAB
SAB

Reputation: 315

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

Upvotes: 6

Related Questions