天天看点

nginx 502 错误日志Connect to unix:/var/run/php5-fpm.sock failed

nginx错误日志如下

3239#0: *15188 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: my.domain, request: "POST /xmlrpc.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "xxx.xxx.xxx.xxx"

在/etc/php5/fpm/pool.d/www.conf中编辑listen

= /var/run/php5-fpm.sock

为127.0.0.1:9000

在/etg/nginx/sites-available/**.conf中编辑fastcgi_pass

/var/run/php5-fpm.sock

为127.0.0.1:9000

后重启nginx,php5-fpm即可

查看每个php5-fpm消耗的内存命令

ps -ylC php-fpm --sort:rss
           

查看RSS列,单位是KB