Nginx and php-fpm communication issue

nginxphp-fpm

I have 2 nginx server and 4 dedicated php-fpm servers configured in upstream for executing PHP with 2 instances each means in upstream i have given 8 instances with ports 9000 & 9001 for each php-fpm server.

Sometime what happens nginx not able to connect php-fpm on port 9000 and 9001 and even when i do telnet from nginx to php-fpm server on port 9000 or 9001 it does not connect.

What kind of log should be enabled on nginx and php-fpm to identify the issue weather its a network connectivity issue or server issue.

Any help would be greatly appreciated.

Thanks

Best Answer

It is possible that php-fpm only listens on 127.0.0.1 en does not accept connections from other servers, you should run (as root) 'netstat -tulnp' and see on what port/address php-fpm listens on.