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
Large multipart file being read into memory in SpringSingleMultipartFileWriter making OOM issue #121
Comments
Yes, this has also been opened before here: #88 I'm also waiting for some fix or even any comment by maintainers of this repo. I made a workaround by writing a custom writer for MultipartFormContentProcessor processor = (MultipartFormContentProcessor) getContentProcessor(MULTIPART);
processor.addFirstWriter(new CustomStreamManyMultipartFilesWriter(STREAM_BUFFER_SIZE));
processor.addFirstWriter(new CustomStreamSingleMultipartFileWriter(STREAM_BUFFER_SIZE)); |
Hi, bro,I encounter the same problem, but i guess your code can't solve it,because in the
|
Oh I didn't see this one... |
Hello,
When uploading a multipart file via a feign client, the OOM is raised when the file is larger than 500 Mbs (for example).
Log shows that the exception occurs at:
https://github.com/OpenFeign/feign-form/blob/master/feign-form-spring/src/main/java/feign/form/spring/SpringSingleMultipartFileWriter.java#L45
the
write
method reads all the bytes of the file into memory.The solution to avoid OOM would be just to stream the file into the output, could we get this fix?
Thanks
The text was updated successfully, but these errors were encountered: