Nginx + PHP-FPM (11: Resource temporarily unavailable)

作者:Hily 原始链接:http://hily.me/blog/2010/02/nginx-php-fpm-resouce-temporarily-unavailable/
版权声明:可以转载,转载时务必以超链接形式标明文章原始出处作者信息版权声明

今天在测试服务器上搭了 Nginx + PHP-FPM 的环境,结果发现 PHP 页面频繁出现 502 Bad Gateway 错误。
Nginx 版本:nginx/0.7.61
PHP-FPM:php-5.3.0-fpm-0.5.12
Nginx 错误日志:

connect() to unix:/tmp/php-fpm.socket failed (11: Resource temporarily unavailable) while connecting to upstream

看起来似乎是 PHP-FPM 的问题,看老外的讨论:
http://forum.nginx.org/read.php?3,31467,31467
把 PHP-FPM 配置文件中的:

<value name="backlog">-1</value>

改成:

<value name="backlog">1024</value>

问题消除!

-- EOF --

发表一下您的高见

If you have any question, or for the language problem, please fell free to leave a comment or just contact me with email: hilyjiang [At] Gmail.