1

I'm getting a 413 error however I have set client_max_body_size to be 15G. The file in question is 6.8gb. I have no issues with files between 0-500mb but this is the first large file I have tested. Any ideas on where else I should check or what the solution might be?

UPDATE: I am also chunking the file in upload using Dropzone.js and using a library to piece it together. I think it's not actually splitting the chunks so this could be my issue.. will investigate further.

Browser Error PHP ini settings Server Setting

Robert Owen
  • 930
  • 7
  • 12
  • 1
    If I research this I see in various spot that if you use Chrome, you will be limited to 4GB per file. This info seems old. Other browsers allow similar or smaller file sizes. It is possible that 64-bit versions of browsers allow bigger files. The question is whether it is wise to use the HTTP protocol for such large files? If you really must, why not chop the file into pieces with Javascript and reconstruct it after the upload? – KIKO Software Jan 07 '23 at 14:52
  • Ah, I wasn't the first one to think of this: https://stackoverflow.com/questions/26257525/large-file-upload-through-browser-100-gb – KIKO Software Jan 07 '23 at 14:54
  • @KIKOSoftware thanks for replying. I am already chunking the file to 250mb sections and it is pieced together on the server. I feel like the 413 could be happening upon the script moving the file? – Robert Owen Jan 07 '23 at 16:44
  • 1
    I think `post_max_size` might be too small (see: https://stackoverflow.com/a/4715480/724039 , and `ceil(6.8Gb /3)*4 = 12Gb` ) – Luuk Jan 07 '23 at 16:50
  • 1
    P.S.: [Please do not post images of code/error messages](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question/285557#285557) (In this case no one will find `post_max_size`. It is only visible for those who actually take a look at that picture.... ) – Luuk Jan 07 '23 at 16:51
  • @Luuk thanks I'll try that out at some point but I figured out a different solution – Robert Owen Jan 09 '23 at 21:19

1 Answers1

0

I think the issue was with dropzone not chunking the upload properly. I have since upgraded to the latest version and sent the chunk size much lower (2mb) and it seems to be working now.

Robert Owen
  • 930
  • 7
  • 12