[BUG] Possible Memory Leak in Storage Blobs
See original GitHub issueFiling this here on behalf of @jdubois
This issue was reported by a customer doing large selection of blobs.
This is using the new API for blob storage. Please note that those are my notes from discussing with the client, I haven’t reproduced the case myself (for obvious reasons, you need a lot of blobs!), but I am pretty confident he is correct.
Doing a “blobContainerClient.listBlobs().streamByPage()” is causing memory leaks when you have a huge number of blobs, so we probably have some pointer left somewhere there.
Here is his solution, that do indeed work in production:
- use
streamByPage
and notiterableByPage
, as it has aclose
method - force clean the body of HTTP requests using the Reactor API, using
response.getRequest().setBody(Flux.never());
- disable the buffer copies in Netty:
new NettyAsyncHttpClientBuilder().disableBufferCopy(true).build();
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (10 by maintainers)
Top Results From Across the Web
Possible memory leak for Azure blob storage - rclone forum
Try running vfs/forget on the directory cache to clear it and release the memory. This is a known problem (the directory cache growing...
Read more >554678 - Blobs use too much memory even with ... - Monorail
So I'm guessing that there is another memory leak somewhere in your program. Blobs move their data into the browser process immediately, so...
Read more >Java api: blob input stream default values might causes out of ...
Hi. I have noticed that when using the BlobInputStream with default BlobInputStreamOptions, the jvm might crahs because of out of memory.
Read more >Memory leak using AppendBlob - Stack Overflow
Per my understanding, each log record you stored is appended with a new-line character (\n). You leverage GetLastLogRows to retrieve the ...
Read more >4 Types of Memory Leaks in JavaScript and How to Get Rid Of ...
In essence, memory leaks can be defined as memory that is not required by an application anymore that for some reason is not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Dear awesome MS team, a quick follow up to let you know we’ve upgraded our compliance scan app to fully use reactive, parallel and paging capabilities of the SDK (
ParallelFlux<PagedResponse<BlobItem>>
), and we’re now able to browse 19 110 738 files over 330 terabytes in less than one hour.You’ve built a finely tuned piece of software, thanks 👏
Fixed in #15929