From fb6d548ec24aefbea50a39e39e240ac34e654d49 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 26 Apr 2024 00:30:44 +0200 Subject: [PATCH] install_httpd-2.4.sh: change default value for FcgidMaxRequestsPerProcess from '500' to '499'. --- install_httpd-2.4.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_httpd-2.4.sh b/install_httpd-2.4.sh index 8c15376..a343bbc 100755 --- a/install_httpd-2.4.sh +++ b/install_httpd-2.4.sh @@ -3702,10 +3702,10 @@ if $WITH_MOD_FCGID ; then echo "## - httpd.conf: Adjust mod_fcgid module.." >> ${_logdir}/main.log echo "## -" >> ${_logdir}/main.log cat <> ${_logdir}/main.log -perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n\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#" \$_httpdconf +perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n\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#" \$_httpdconf EOF echononl "\thttpd.conf: Adjust mod_fcgid module.." - perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n\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#" $_httpdconf + perl -i.bak -n -p -e "s#^(\s*LoadModule\s+fcgid_module.+)#\1\n\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#" $_httpdconf if [ "$?" = "0" ]; then echo_ok else