简体   繁体   English

无法初始化php-fpm

[英]Unable to initialize php-fpm

I have facing some problem in php-fpm using ngnix.but when I access a server it throws a 502 Bad Gateway. 我在使用ngnix.php-fpm时遇到了一些问题,但是当我访问服务器时会抛出502 Bad Gateway。

Error logs : - 错误日志:-

11-Aug-2014 07:27:02] ERROR: epoll: unable to initialize
[11-Aug-2014 07:27:02] ERROR: epoll: unable to initialize
[11-Aug-2014 07:27:02] ERROR: Unable to initialize the event module epoll
[11-Aug-2014 07:27:02] ERROR: Unable to initialize the event module epoll
[11-Aug-2014 07:27:02] ERROR: FPM initialization failed
[11-Aug-2014 07:27:02] ERROR: FPM initialization failed

PHP-FPM can use a variety of mechanisms for listening on the potentially large number of sockets it has to maintain. PHP-FPM可以使用多种机制来监听必须维护的大量套接字。 By default it choses the mechanism automatically, but it can be overridden by using the events.mechanism configuration setting in php-fpm.conf. 默认情况下,它会自动选择机制,但是可以使用php-fpm.conf中的events.mechanism配置设置来覆盖它。

From the upstream configuration file: 从上游配置文件:

; Specify the event mechanism FPM will use. The following is available:
; - select     (any POSIX os)
; - poll       (any POSIX os)
; - epoll      (linux >= 2.5.44)
; - kqueue     (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
; - /dev/poll  (Solaris >= 7)
; - port       (Solaris >= 10)
; Default Value: not set (auto detection)
; events.mechanism = epoll

In other words, if epoll doesn't work for whatever reason (eg some virtualization restriction, etc), you can pick another mechanism. 换句话说,如果epoll由于某种原因(例如某些虚拟化限制等)而无法正常工作,则可以选择其他机制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM