Php
更改 PHP_FCGI_MAX_REQUESTS
我找不到可以更改 .conf 值的 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
您可以添加:
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