简体   繁体   中英

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.

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. By default it choses the mechanism automatically, but it can be overridden by using the events.mechanism configuration setting in php-fpm.conf.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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