minio-dotnet icon indicating copy to clipboard operation
minio-dotnet copied to clipboard

MinIO API responded with message 'System.OutOfMemoryException'

Open yilezhu opened this issue 1 year ago • 6 comments

I'm use Minio nuget version is 4.0.7.. When I uploaded an 80MB file, it was successful, but when I getthe file by ·getObjectStreamAsync·, I reported the following error. 无标题 “MinIO API responded with message=Connection error:Exception of type 'System.OutOfMemoryException' was thrown” . But in reality, my program only occupies about 300M of memory,can you provide me with some troubleshooting ideas. Here is the code for me to get the file 2

yilezhu avatar Aug 06 '23 05:08 yilezhu

@yilezhu Do you have an exact reproducer for this issue?

kannappanr avatar Aug 06 '23 05:08 kannappanr

@kannappanr I am currently unable to reset this situation. It is a problem with a certain environment, and it was good when I debugged locally. In the environment where this issue occurs, Minio is using version 2022-10-24 and the nuget package version is 4.0.7

yilezhu avatar Aug 06 '23 05:08 yilezhu

So am I, the memory is not released after upload the file stream .

lxmou666 avatar Aug 07 '23 14:08 lxmou666

So am I, the memory is not released after upload the file stream .

Thank you for your reply. When I uploaded, I tried using the using statement to release stream, but I didn't use the using statement to respond to the stream's release when obtaining files. Let me try and see the effect.

yilezhu avatar Aug 08 '23 01:08 yilezhu

@yilezhu inject "MinioClient" by "Minio.AspnetCore" to upload the file stream, the memory is not released, and use "new MinioClient" to upload the file stream memory will be released

lxmou666 avatar Aug 08 '23 04:08 lxmou666

Use the 5.0.x version because they have a lot of memory improvements.

martijn00 avatar Aug 08 '23 07:08 martijn00