[Bug][API] OOM occurs when uploading large files
Describe the bug
When uploading large files(353MB) in the resource center, the page progress bar is stuck at 100%, view the background API logs and find OOM
I fixed this after modifying the JVM parameters in the /bin/dolphinscheduler-daemon.sh script, but felt it was not a good idea to do so.Do you want to add a configuration item or an FAQ?

Which version of Dolphin Scheduler: -[1.3.2-release]
This actually is not a bug, I think we can Add it to FAQ, if you are interested in putting your solution to FAQ, please leave a message.
This actually is not a bug, I think we can Add it to FAQ, if you are interested in putting your solution to FAQ, please leave a message.
+1
This actually is not a bug, I think we can Add it to FAQ, if you are interested in putting your solution to FAQ, please leave a message.
I can help to improve FAQ, but I don't know how to submit
I think we may be able to do better for this. for multipart files in springboot & jetty, it should use streaming mode to not directly load the whole file in memory.
But according to spring boot's documentation: https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.html
`file-size-threshold specifies the size threshold after which files will be written to disk. The default is 0.`
The default is 0, so, it will parse uploaded multipart file into memory, instead of writing to temp file.
So, I guess set the spring.http.multipart.file-size-threshold to a value like 10MB. may avoid the OutOfMemory error
spring.http.multipart.file-size-threshold=10MB
Can you try whether this will reduce memory usage?
I think If we can implement it with streaming mode, it will be better. You can try it as baoqi way.
------------------ Original ------------------ From: Baoqi Wu <[email protected]> Date: Thu,Sep 3,2020 5:19 PM To: apache/incubator-dolphinscheduler <[email protected]> Cc: Yichao Yang <[email protected]>, Comment <[email protected]> Subject: Re: [apache/incubator-dolphinscheduler] [Bug][API] OOM occurs when uploading large files (#3643)
I think we may be able to do better for this. for multipart files in springboot & jetty, it should use streaming mode to not directly load the whole file in memory.
But according to spring boot's documentation: https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.html
file-size-threshold specifies the size threshold after which files will be written to disk. The default is 0.
The default is 0, so, it will parse uploaded multipart file into memory, instead of writing to temp file.
So, I guess set the spring.http.multipart.file-size-threshold to a value like 10MB. may avoid the OutOfMemory error
spring.http.multipart.file-size-threshold=10MB
Can you try whether this will reduce memory usage?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.