我找不到可以更改 值的 conf 文件的位置PHP_FCGI_MAX_REQUESTS
。系统信息:Debian、php7、FAST-CGI、Apache 2.4、Plesk Onyx 17。
网上也有类似的问题,但是没有一个答案能帮助我解决问题。
我设置了,所以我也FcgidMaxRequestsPerProcess 1500
需要改变的值。PHP_FCGI_MAX_REQUESTS
输出plesk bin php_handler --list
id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
cgi 5.6.33 by OS vendor 5.6.33 5.6 cgi /usr/bin/php5-cgi /usr/bin/php5 /etc/php5/cgi/php.ini false disabled
fastcgi 5.6.33 by OS vendor 5.6.33 5.6 fastcgi /usr/bin/php5-cgi /usr/bin/php5 /etc/php5/cgi/php.ini false enabled
fpm 5.6.33 by OS vendor 5.6.33 5.6 fpm /usr/sbin/php5-fpm /usr/bin/php5 /etc/php5/fpm/php.ini false enabled
module 5.6.33 by OS vendor 5.6.33 5.6 module /usr/bin/php5-cgi /usr/bin/php5 /etc/php5/apache2/php.ini false disabled
plesk-php56-cgi 5.6.34 5.6.34 5.6 cgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true disabled
plesk-php56-fastcgi 5.6.34 5.6.34 5.6 fastcgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true enabled
plesk-php56-fpm 5.6.34 5.6.34 5.6 fpm /opt/plesk/php/5.6/sbin/php-fpm /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true enabled
plesk-php71-cgi 7.1.15 7.1.15 7.1 cgi /opt/plesk/php/7.1/bin/php-cgi /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true disabled
plesk-php71-fastcgi 7.1.15 7.1.15 7.1 fastcgi /opt/plesk/php/7.1/bin/php-cgi /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true enabled
plesk-php71-fpm 7.1.15 7.1.15 7.1 fpm /opt/plesk/php/7.1/sbin/php-fpm /opt/plesk/php/7.1/bin/php /opt/plesk/php/7.1/etc/php.ini true enabled
答案1
您只需添加:
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1500
前FcgidMaxRequestsPerProcess 1500
。
这将在加载 mod_fcgid 之前将环境变量 PHP_FCGI_MAX_REQUESTS 设置为 1500。
更多信息https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidinitialenv