-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting a "java.lang.OutOfMemoryError: Java heap space" when upload large (+1 GB) files #101
Comments
have you found a workaround that is not making the http request manually? |
yes, I used the RestTemplate from Spring Framework to upload the large files, I ended up with two clients implementations 🤦 |
Thanks @tmoreira2020 , I was able to use RestTemplate to upload large files but unable to make it work for downloading them, did you have the same need? |
The trick here (and this applies for any download/upload) is to take advantage of storage media (local hdd, s3, whatever) and keep in memory only a buffer. If keeping a gigabyte file in memory is unstable when running with single client in dev, imagine what's going to happen when there are several parallel downloads on prod? |
Hi there, after some researching and source code review I identified that there is low support to upload large files. I'm trying to upload a file bigger than 1GB and the following stacktrace pops up on my log.
The
uploadBackup
method is defined like this:I identified that there is low support because the SingleFileWriter.write method loads the entire file into the memory.
Are there any other configuration that I can use to fix or workaround this limitation issue?
Thanks
The text was updated successfully, but these errors were encountered: