question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Possible Memory Leak in Storage Blobs

See original GitHub issue

Filing 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 not iterableByPage, as it has a close 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:closed
  • Created 3 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

15reactions
cbismuthcommented, Nov 16, 2020

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 👏

2reactions
alzimmermsftcommented, Oct 23, 2020

Fixed in #15929

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found