We face an issue of failure in upload files of more than a GB in size which will keep printing apache error.logs during upload in progress as:
[Tue May 07 04:16:35.109777 2024] [cgi:error] [pid 30766] (-102)Unknown error -102: [client 10.140.204.23:64774] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:17:05.919928 2024] [cgi:error] [pid 30768] (-102)Unknown error -102: [client 10.140.204.23:64802] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:17:36.592258 2024] [cgi:error] [pid 30767] (-102)Unknown error -102: [client 10.140.204.23:64849] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:18:07.223293 2024] [cgi:error] [pid 30766] (-102)Unknown error -102: [client 10.140.204.23:64884] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:18:37.928108 2024] [cgi:error] [pid 30767] (-102)Unknown error -102: [client 10.140.204.23:64916] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:19:08.700924 2024] [cgi:error] [pid 30768] (-102)Unknown error -102: [client 10.140.204.23:64950] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:19:39.443934 2024] [cgi:error] [pid 30767] (-102)Unknown error -102: [client 10.140.204.23:64980] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Tue May 07 04:20:10.530056 2024] [cgi:error] [pid 30766] (-102)Unknown error -102: [client 10.140.204.23:65029] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
This is been observed after upgrading httpd-2.4.41 to httpd-2.4.58. Tried with smaller files which gets uploaded without any issue.
Increased timeout to 600 in httpd.conf and apache2.conf still no luck. Any suggestions?
Edit1:
htaccess looks like below:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
<IfModule mod_security.c>
SecRuleEngine On
SecRequestBodyAccess On
SecRequestBodyLimit 2147483648
SecRequestBodyNoFilesLimit 524288
SecRequestBodyInMemoryLimit 524288
</IfModule>
<IfModule mod_php7.c>
php_value upload_max_filesize 15000M
php_value post_max_size 15001M
php_value memory_limit 15000M
</IfModule>
and httpd.conf added below line:
LimitRequestBody 3000000000
Seems a problem I have faced sometime ago. Try to increase LimitRequestBody
in main apache conf or the virtual host conf file:
LimitRequestBody 3000000000
Adapt to your specific needs, this is for ~3GB
See CVE-2022-29404