Apache 中 mod_fcgi 在没有 mod_reqtimeout 的情况下出现“部分结果有效但处理不完整”的原因是什么

Apache 中 mod_fcgi 在没有 mod_reqtimeout 的情况下出现“部分结果有效但处理不完整”的原因是什么

我正在运行 Apache 2.4 来为 Nextcloud 提供服务,偶尔会收到错误

[proxy_fcgi:error] cloud.my-domain.tld: (70008)Partial results are valid but processing is incomplete: AH01075: Error dispatching request to : (reading input brigade)

到目前为止,我找到的所有解决方案都表明这mod_reqtimeout是问题所在。但是,在我的情况下,mod_reqtimeout它没有启用,也没有(静态)内置到 Apache 中。

什么可能导致此错误和/或如何调试根本原因?我已经将日志级别提高到“调试”,但没有发现任何可疑之处。


日志:

Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH01143: Running scheme unix handler (attempt 0)
Mar 13 14:47:50 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01076: url: fcgi://php//var/www/my-domain.tld/nextcloud/ocs/v2.php proxyname: (null) proxyport: 0
Mar 13 14:47:50 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01078: serving URL fcgi://php//var/www/my-domain.tld/nextcloud/ocs/v2.php
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00942: FCGI: has acquired connection for (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00944: connecting fcgi://php//var/www/my-domain.tld/nextcloud/ocs/v2.php to php:8000
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00947: connected //var/www/my-domain.tld/nextcloud/ocs/v2.php to httpd-UDS:0
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00943: FCGI: has released connection for (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH01143: Running scheme unix handler (attempt 0)
Mar 13 14:47:50 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01076: url: fcgi://php//var/www/my-domain.tld/nextcloud/ocs/v2.php proxyname: (null) proxyport: 0
Mar 13 14:47:50 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01078: serving URL fcgi://php//var/www/my-domain.tld/nextcloud/ocs/v2.php
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00942: FCGI: has acquired connection for (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00944: connecting fcgi://php//var/www/my-domain.tld/nextcloud/ocs/v2.php to php:8000
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00947: connected //var/www/my-domain.tld/nextcloud/ocs/v2.php to httpd-UDS:0
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH01143: Running scheme unix handler (attempt 0)
Mar 13 14:47:50 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01076: url: fcgi://php//var/www/my-domain.tld/nextcloud/remote.php proxyname: (null) proxyport: 0
Mar 13 14:47:50 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01078: serving URL fcgi://php//var/www/my-domain.tld/nextcloud/remote.php
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00942: FCGI: has acquired connection for (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00944: connecting fcgi://php//var/www/my-domain.tld/nextcloud/remote.php to php:8000
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00947: connected //var/www/my-domain.tld/nextcloud/remote.php to httpd-UDS:0
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00943: FCGI: has released connection for (php:8000)
Mar 13 14:47:50 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00943: FCGI: has released connection for (php:8000)
Mar 13 14:48:08 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00943: FCGI: has released connection for (php:8000)
Mar 13 14:48:09 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH01143: Running scheme unix handler (attempt 0)
Mar 13 14:48:09 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01076: url: fcgi://php//var/www/my-domain.tld/nextcloud/remote.php proxyname: (null) proxyport: 0
Mar 13 14:48:09 server apache[742310]: [proxy_fcgi:debug] cloud.my-domain.tld: AH01078: serving URL fcgi://php//var/www/my-domain.tld/nextcloud/remote.php
Mar 13 14:48:09 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00942: FCGI: has acquired connection for (php:8000)
Mar 13 14:48:09 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00944: connecting fcgi://php//var/www/my-domain.tld/nextcloud/remote.php to php:8000
Mar 13 14:48:09 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02545: fcgi: has determined UDS as /run/php-fpm/www.sock
Mar 13 14:48:09 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00947: connected //var/www/my-domain.tld/nextcloud/remote.php to httpd-UDS:0
Mar 13 14:48:09 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH02823: FCGI: connection established with Unix domain socket /run/php-fpm/www.sock (php:8000)
Mar 13 14:51:53 server apache[742310]: [proxy_fcgi:error] cloud.my-domain.tld: (70008)Partial results are valid but processing is incomplete: AH01075: Error dispatching request to : (reading input brigade)
Mar 13 14:51:53 server apache[742310]: [proxy:debug] cloud.my-domain.tld: AH00943: FCGI: has released connection for (php:8000)

apache2ctl -M返回

server ~ # apache2ctl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_event_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 headers_module (shared)
 http2_module (shared)
 include_module (shared)
 logio_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 proxy_module (shared)
 proxy_fcgi_module (shared)
 proxy_http_module (shared)
 proxy_http2_module (shared)
 proxy_wstunnel_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 unixd_module (shared)

Apache 配置中可能相关的部分

LogLevel notice proxy:debug proxy_fcgi:debug
# ...
<IfModule mpm_event_module>
        StartServers            3
        MinSpareThreads         15
        MaxSpareThreads         80
        ThreadsPerChild         25
        MaxRequestWorkers       400
        MaxConnectionsPerChild  0
</IfModule>
# ...
<IfModule !mod_php8.c>
<IfModule proxy_fcgi_module>
        <IfModule setenvif_module>
                SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
        </IfModule>
        <Proxy "fcgi://php/">
                ProxySet flushpackets=auto flushwait=10 timeout=1200
        </Proxy>
        <FilesMatch ".+\.ph(?:ar|p|tml)$">
                <If "-f %{SCRIPT_FILENAME}">
                        SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://php/"
                </If>
        </FilesMatch>
        <FilesMatch ".+\.phps$">
                Require all denied
        </FilesMatch>
        <FilesMatch "^\.ph(?:ar|p|ps|tml)$">
                Require all denied
        </FilesMatch>
</IfModule>
</IfModule>

PHP FPM 配置中可能相关的部分

error_log = syslog
log_level = notice
; This value must high enough to serve the maximum number of simultaneous
; Apache request plus some slack for CLI requests
; Apache spawns at most 16 processes (see ServerLimit) with 25 worker treads each
; (see ThreadsPerChild) and hence can serve at most 400 requests
; (see MaxRequestWorkers).
; Here we round up to 420.
pm.max_children = 420
pm.start_servers = 20
pm.min_spare_servers = 15
pm.max_spare_servers = 25

php.iniFPM中可能相关的部分:

max_execution_time = 1200
max_input_time = 1200
post_max_size = 1638M
upload_max_filesize = 1228M
max_file_uploads = 512

相关内容