【发布时间】:2015-04-10 04:56:05
【问题描述】:
我在 Windows 中使用 PHP 启动 Nginx。 Nginx 使用 FastCGI 连接到 PHP。一切正常,但有时php-cgi.exe 崩溃并且不起作用。 windows日志是:
子进程 [3952 - D:\nginx\php\php-cgi.exe -b127.0.0.1:9000 -cD:\nginx\php\php.ini ] 以 0 结束
谁能帮帮我?
【问题讨论】:
我在 Windows 中使用 PHP 启动 Nginx。 Nginx 使用 FastCGI 连接到 PHP。一切正常,但有时php-cgi.exe 崩溃并且不起作用。 windows日志是:
子进程 [3952 - D:\nginx\php\php-cgi.exe -b127.0.0.1:9000 -cD:\nginx\php\php.ini ] 以 0 结束
谁能帮帮我?
【问题讨论】:
set PHP_FCGI_CHILDREN=0
set PHP_FCGI_MAX_REQUESTS=5000
and run pgp-cgi with these environment values.
【讨论】:
PHP_FCGI_MAX_REQUESTS 几乎可以肯定不适合这里。它会导致 PHP 在 5000 个请求后退出,导致问题与问题所抱怨的非常相似!