dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug][API] OOM occurs when uploading large files

Open yy0812 opened this issue 6 years ago • 5 comments

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 image 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? image

Which version of Dolphin Scheduler: -[1.3.2-release]

yy0812 avatar Sep 02 '20 06:09 yy0812

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.

yangyichao-mango avatar Sep 02 '20 15:09 yangyichao-mango

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

CalvinKirs avatar Sep 02 '20 15:09 CalvinKirs

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

yy0812 avatar Sep 03 '20 02:09 yy0812

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?

Baoqi avatar Sep 03 '20 09:09 Baoqi

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.

yangyichao-mango avatar Sep 03 '20 13:09 yangyichao-mango