Large file uploads fail with browser status of 413
Steps to reproduce
Create a content type add a field for media type video or a contributed video upload field (doesn't matter type)
With media field type video it defaults to a maximum file upload based on "php.ini settings which is currently set at 6GB" for the site in question.
Go to add content select the new content type and try to upload a large video file (currently trying to upload a video that is 1.6GB and is an mp4 video type) which is well within the 6GB limit.
After several minutes the upload fails with the following error listed in web browser developer tools console:
Failed to load resource: the server responded with a status of 413 ()
Uncaught
Drupal.AjaxError {message: '\nAn AJAX HTTP error occurred.\nHTTP Result Code: 41β¦ \\u003C\\/div\\u003E\\n \\n","settings":null}]', name: 'AjaxError'}
message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 413\nDebugging information follows.\nPath: /node/add/product_post?element_parents=field_test_video/widget/0&ajax_form=1\nStatusText: error\nResponseText: \n413 Request Entity Too Large\nRequest Entity Too Large\nThe requested resource does not allow request data with POST requests, or the amount of data provided in\nthe request exceeds the capacity limit.\nApache/2.4.38 (Debian) Server at the.domain-name Port 80\n[{\"command\":\"add_css\",\"data\":\"\\u003Clink rel=\\u0022stylesheet\\u0022 media=\\u0022all\\u0022 href=\\u0022\\/core\\/themes\\/classy\\/css\\/components\\/messages.css?rooygs\\u0022 \\/\\u003E\\n\"},{\"command\":\"insert\",\"method\":\"prepend\",\"selector\":null,\"data\":\"\\n \\u003Cdiv role=\\u0022contentinfo\\u0022 aria-label=\\u0022Error message\\u0022 class=\\u0022messages messages--error\\u0022\\u003E\\n \\u003Cdiv role=\\u0022alert\\u0022\\u003E\\n \\u003Ch2 class=\\u0022visually-hidden\\u0022\\u003EError message\\u003C\\/h2\\u003E\\n An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (6 GB) that this server supports.\\n \\u003C\\/div\\u003E\\n \\u003C\\/div\\u003E\\n \\n\",\"settings\":null}]"
name: "AjaxError"
[[Prototype]]: Error at https://the.domain-name/core/misc/ajax.js?v=9.5.1:92:32 at https://the.domain-name/core/misc/ajax.js?v=9.5.1:642:3
constructor: Ζ (xmlhttp, uri, customMessage)
stack: "Error\n at https://the.website-domain/core/misc/ajax.js?v=9.5.1:92:32\n at https://the.website-domain/core/misc/ajax.js?v=9.5.1:642:3"
[[Prototype]]: Object
Drupal.Ajax.error @ ajax.js?v=9.5.1:448
complete @ ajax.js?v=9.5.1:221
M.complete.M.complete @ jquery.form.min.js?v=4.3.0:22
c @ jquery.min.js?v=3.6.3:2
fireWith @ jquery.min.js?v=3.6.3:2
l @ jquery.min.js?v=3.6.3:2
(anonymous) @ jquery.min.js?v=3.6.3:2
NOTE: (and why this has to be a bug) On the same server a Drupal 7 site with a video upload field on a content type set to a max file size of 2GB and the "same 1.6GB .mp4" file uploads perfectly fine.
Here are the status page info as well as the php.ini info for the Drupal 9 website:
Drupal version 9.5.1
PHP version 8.1.13
Memory Limit 12288M
Web Server Apache/2.4.38 (Debian)
Database MySQL Version 5.7.40
-> If needed I can copy and past the entire page to this to include everything if needed?
Here is the php.ini info: (copied directly from the info page Drupal supplies)
max_execution_time 2048
max_file_uploads 100000
max_input_nesting_level 64
max_input_time -1
max_input_vars 200000
memory_limit 12288M
post_max_size 6144M
upload_max_filesize 6144M
-> If needed I can also copy and paste the entire page with everything included if needed?
There are no errors listed in Drupal's DBLog when this occurs, there is also nothing returned to the node/add page specifying an error! (which I feel there should be)
Now for comparison here is the Drupal 7 site Status page and php.ini details for comparison (as they are both live under different domains on the same server) "the Drupal 7 site does not have any problems with the same file"
Drupal version 7.94
PHP version 7.3.12
Memory Limit 4096M
Web Server Apache/2.4.25 (Debian)
Database MySQL version 5.6.43
-> again if needed I can copy and paste the entire status page with everything if needed?
Here is the php.ini info: (copied directly from the info page Drupal supplies)
max_execution_time 120
max_file_uploads 10000
max_input_nesting_level 64
max_input_time -1
max_input_vars 100000
memory_limit 4096M
post_max_size 2048M
upload_max_filesize 2048M
-> again I can also copy the entire info page if needed with everything?
Besides the max_upload, post and memory limit (as well as php versions) everything is virtually identical between Drupal 7 and Drupal 9 backend server setup, etc.
Drupal 9 is failing large file uploads and this is a major problem as I'm actually trying to rebuild the entire "working Drupal 7 site in Drupal 9 -> (migration isn't an option for how extensively the D7 site is customized)
- This issue is causing a major problem in trying to continue as large video uploads is an absolute requirement!
Again the same 1.6GB file that uploads to Drupal 7 just fine will not upload on Drupal 9 (as a core Media type video field or in a contributed module video field)
In Drupal 9 when uploading the media uploader field does say 6GB limit (and is set to allow .mp4 video file types)
If more information is needed and or screen shots please let me know as this is blocking continued development (and currently there are no core patches being applied) if there is a patch that addresses this I have not been able to find it
Apologies if this should be listed under another core component besides "file system" if it should be please update it to reflect the proper component.