install_httpd-2.4.sh: change default value for FcgidMaxRequestsPerProcess from '500' to '499'.

This commit is contained in:
Christoph 2024-04-26 00:30:44 +02:00
parent 3788d853f9
commit fb6d548ec2

View File

@ -3702,10 +3702,10 @@ if $WITH_MOD_FCGID ; then
echo "## - httpd.conf: Adjust mod_fcgid module.." >> ${_logdir}/main.log
echo "## -" >> ${_logdir}/main.log
cat <<EOF >> ${_logdir}/main.log
perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n<IfModule mod_fcgid.c>\n\n \# in Abstimmung mit PHP variablen\n \# upload_max_filesize = 128M\n \# post_max_size = 512M\n FcgidMaxRequestLen 536870912\n\n \# By default, PHP FastCGI processes exit after handling 500 requests,\n \# and they may exit after this module has already connected to the\n \# application and sent the next request. When that occurs, an error\n \# will be logged and 500 Internal Server Error will be returned to\n \# the client. This PHP behavior can be disabled by setting\n \# PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP\n \# application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS\n \# can be set to a much higher value than the default to reduce the\n \# frequency of this problem. FcgidMaxRequestsPerProcess can be set to\n \# a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the\n \# roblem.\n FcgidMaxRequestsPerProcess 500\n\n \# in Abstimmung mit PHP Variablen\n \# max_execution_time = 180\n \#\n \# Default: 40\n \#\n \#FcgidIOTimeout 181\n FcgidIOTimeout 600\n FcgidIdleTimeout 600\n FcgidProcessLifeTime 600\n FcgidConnectTimeout 600\n\n</IfModule>#" \$_httpdconf
perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n<IfModule mod_fcgid.c>\n\n \# in Abstimmung mit PHP variablen\n \# upload_max_filesize = 128M\n \# post_max_size = 512M\n FcgidMaxRequestLen 536870912\n\n \# By default, PHP FastCGI processes exit after handling 500 requests,\n \# and they may exit after this module has already connected to the\n \# application and sent the next request. When that occurs, an error\n \# will be logged and 500 Internal Server Error will be returned to\n \# the client. This PHP behavior can be disabled by setting\n \# PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP\n \# application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS\n \# can be set to a much higher value than the default to reduce the\n \# frequency of this problem. FcgidMaxRequestsPerProcess can be set to\n \# a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the\n \# roblem.\n FcgidMaxRequestsPerProcess 499\n\n \# in Abstimmung mit PHP Variablen\n \# max_execution_time = 180\n \#\n \# Default: 40\n \#\n \#FcgidIOTimeout 181\n FcgidIOTimeout 600\n FcgidIdleTimeout 600\n FcgidProcessLifeTime 600\n FcgidConnectTimeout 600\n\n</IfModule>#" \$_httpdconf
EOF
echononl "\thttpd.conf: Adjust mod_fcgid module.."
perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n<IfModule mod_fcgid.c>\n\n \# in Abstimmung mit PHP variablen\n \# upload_max_filesize = 128M\n \# post_max_size = 512M\n FcgidMaxRequestLen 536870912\n\n \# By default, PHP FastCGI processes exit after handling 500 requests,\n \# and they may exit after this module has already connected to the\n \# application and sent the next request. When that occurs, an error\n \# will be logged and 500 Internal Server Error will be returned to\n \# the client. This PHP behavior can be disabled by setting\n \# PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP\n \# application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS\n \# can be set to a much higher value than the default to reduce the\n \# frequency of this problem. FcgidMaxRequestsPerProcess can be set to\n \# a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the\n \# roblem.\n FcgidMaxRequestsPerProcess 500\n\n \# in Abstimmung mit PHP Variablen\n \# max_execution_time = 180\n \#\n \# Default: 40\n \#\n \#FcgidIOTimeout 181\n FcgidIOTimeout 600\n FcgidIdleTimeout 600\n FcgidProcessLifeTime 600\n FcgidConnectTimeout 600\n\n</IfModule>#" $_httpdconf
perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n<IfModule mod_fcgid.c>\n\n \# in Abstimmung mit PHP variablen\n \# upload_max_filesize = 128M\n \# post_max_size = 512M\n FcgidMaxRequestLen 536870912\n\n \# By default, PHP FastCGI processes exit after handling 500 requests,\n \# and they may exit after this module has already connected to the\n \# application and sent the next request. When that occurs, an error\n \# will be logged and 500 Internal Server Error will be returned to\n \# the client. This PHP behavior can be disabled by setting\n \# PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP\n \# application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS\n \# can be set to a much higher value than the default to reduce the\n \# frequency of this problem. FcgidMaxRequestsPerProcess can be set to\n \# a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the\n \# roblem.\n FcgidMaxRequestsPerProcess 499\n\n \# in Abstimmung mit PHP Variablen\n \# max_execution_time = 180\n \#\n \# Default: 40\n \#\n \#FcgidIOTimeout 181\n FcgidIOTimeout 600\n FcgidIdleTimeout 600\n FcgidProcessLifeTime 600\n FcgidConnectTimeout 600\n\n</IfModule>#" $_httpdconf
if [ "$?" = "0" ]; then
echo_ok
else