-
Notifications
You must be signed in to change notification settings - Fork 82
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... |
Yep, Feign itself doesn't support streaming and doesn't provide any API (like OutputStream) to resolve it |
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: