stonith404 / pingvin-share

A self-hosted file sharing platform that combines lightness and beauty, perfect for seamless and efficient file sharing.
https://stonith404.github.io/pingvin-share/
BSD 2-Clause "Simplified" License
2.78k stars 203 forks source link

🐛 Bug Report: v0.22.2 unable to upload a large file (no error/413/browser crash) #423

Closed axiomen closed 5 months ago

axiomen commented 6 months ago

👟 Reproduction steps

I wanted to test another bug (part of #241), but in the process discovered I'm unable to upload a large file (24GB in my test). I either don't get any error in Pingvin logs nor browser logs, or I get 413 Entity too large. I thought the issue was with Caddy, so I added max_size directive to Caddyfile. First I attempted with 30GB, but I figure it only accepts in MB, so changed that accordingly, even though caddy shouldn't be setting any limit by itself if no directive is given. However, my browser crashed unexpectedly while testing that scenario. Furthermore, in the case of 413 error, even after going to Settings or any other page on the Pingvin web UI, the browser console continues to get flooded with multiple errors (413, 500, some of which I remember seeing) upon failed upload.

Tested locally without proxy in the middle (HTTP over IP).

👍 Expected behavior

Successful upload of large files.

👎 Actual Behavior

With no changes to Caddyfile, the browser either stops with the upload, without any errors in the logs or UI (loading animation on Share button also keeps going), or reports 413 Entity too large error. With changes to Caddyfile, the browser crashes. I'll be honest, I'm not at all familiar with caddy.

🌐 Browser

Firefox, Chrome

stonith404 commented 5 months ago

This should probably be fixed in the latest release, as the maximum request body size is now exactly the same as the chunk size.

Can you confirm that the bug is fixed?

axiomen commented 5 months ago

I managed to upload a 24.6 GB file, everything looks clean without proxy. It should probably work with proxy in the middle, too, but I'll test that later. The memory footprint is also on par with Chrome now, i.e. very low.

axiomen commented 5 months ago

I uploaded a smaller file (6 GB) to my remote, proxied instance and encountered no errors. The bigger file would most likely work as well, but it's too big to transfer remotely in my current environment.


Decided to test the 24 GB file anyway, because I noticed request entity too large in Pingvin logs. No errors, worked well. I think the issue can be closed.

stonith404 commented 5 months ago

Great, thanks!