mcnutty26 / music-get

A lightweight music server implementation for UWCS
GNU General Public License v3.0
6 stars 3 forks source link

Uploading a file larger than javas allocated memory causes an exception #4

Open mcnutty26 opened 8 years ago

mcnutty26 commented 8 years ago

Cause: uploading a file larger than (possibly?) 256mb Result: exception and stack trace

mcnutty26 commented 8 years ago

http://www.jedi.be/blog/2009/04/10/java-servlets-and-large-large-file-uploads-enter-apache-fileupload/

Veltas commented 8 years ago

The real issue is Java.

Phillammon commented 8 years ago

I thought that that was declared a feature at LAN.

mcnutty26 commented 8 years ago

We've had the conversation before about the difference (or not, as the case may be) between bugs and features.

Veltas commented 8 years ago

The difference is when we have both bug and wontfix it's a feature.

Veltas commented 8 years ago

Oh yeah we should probably try starting the server with -Xms8G or something. Might actually help. Or maybe someone who actually understands the JVM can suggest something.

mcnutty26 commented 8 years ago

Temporary workaround in 1cc208bab5e36713d6eb0186b03dfc756fe0eed9 Tested with files up to 1G, can increase the memory limit if it's still a problem. We should probably figure out the maximum file size it's reasonable to accept.

Veltas commented 8 years ago

Very appropriate Java approach here, solve the problem with more memory!

EDIT: 1GB is a very acceptable compromise for now. If this gets fixed an appropriate max is probably 10GB, assuming files are deleted after they're played.