0

Files of more than one GB fail to upload, which results in the following apache error.logs as:

[Mon May 13 06:33:27.604183 2024] [cgi:error] [pid 464] (-102)Unknown error -102: [client 10.140.204.235:59564] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Mon May 13 06:33:58.270188 2024] [cgi:error] [pid 462] (-102)Unknown error -102: [client 10.140.204.235:59579] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Mon May 13 06:34:28.962812 2024] [cgi:error] [pid 464] (-102)Unknown error -102: [client 10.140.204.235:59595] AH01225: Error reading request entity data, referer: https://10.105.105.84/cgi-bin/pages.cgi?title=cm_net
[Mon May 13 06:36:02.045791 2024] [core:debug] [pid 465] protocol.c(512): NULL bytes in header (47 bytes)
[Mon May 13 06:36:02.045822 2024] [core:debug] [pid 465] protocol.c(512): ...........V..p. 1603010200010001fc030356a2f370ad
[Mon May 13 06:36:02.045826 2024] [core:debug] [pid 465] protocol.c(512): 4...v..G1VI..... 34a18be676049247315649ce12b1bc0b
[Mon May 13 06:36:02.045828 2024] [core:debug] [pid 465] protocol.c(512): ..pS...+(.. ...  b21070535c071e2b28dcd72097a10a  
[Mon May 13 06:36:02.045840 2024] [core:debug] [pid 465] protocol.c(1450): [client 127.0.0.1:55540] AH00566: request failed: malformed request line
[Mon May 13 06:36:02.180668 2024] [core:debug] [pid 462] protocol.c(512): NULL bytes in header (96 bytes)

This was observed after upgrading httpd-2.4.41 to httpd-2.4.58. Configurations in httpd.conf and apache.conf looks same in both versions. Files less than one GB upload without issue.

as per this doc and could be reason for this behavior: https://downloads.apache.org/httpd/CHANGES_2.4

core: Change default value of LimitRequestBody from 0 (unlimited) to 1GB. [Eric Covener]

htaccess is 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

Increased timeout to 600 in httpd.conf and apache2.conf and restarted apache. Still no luck.

Any suggestions?

1
  • For an update, it worked like charm after adding LimitRequestBody 3000000000 and Timeout 600 in /etc/apache2/apache.conf and restarting the apache. Note: File location may change as per your os
    – Prajwal
    Commented May 16 at 5:20

0

You must log in to answer this question.

Browse other questions tagged .