天天看點

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