tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Fix memory leak

Open danielballan opened this issue 3 years ago • 2 comments

We've known for a couple weeks about a clear memory leak in Tiled. I don't have a simple reproducible example to recreate it, and my initial attempts to write one have failed, so it may not appear in every situation. But we see in the production NSLS2 deployment and @tacaswell has reproduced it locally on a much smaller deployment.

danielballan avatar Oct 06 '22 14:10 danielballan

Using a beamline database that uses databroker to construct datasets from documents, I was able to find a caching issue that led to runaway memory usage. the fix is shown in the following pull request: https://github.com/bluesky/databroker/pull/741

JunAishima avatar Oct 19 '22 23:10 JunAishima

The linked fix seems to address the issue we observed in production at NSLS2. I will leave this issue open while we look into @tacaswell’s report, which did not involve Databroker and seems to be a separate issue.

danielballan avatar Oct 20 '22 02:10 danielballan

@tacaswell shared an example which he believed would reproduce the issue he saw. (The materials are too large to upload here.) I have tried reproducing on latest (v0.1.0a91) and on my best guess at what he was running at the time of the original verbal report, based on the approximate date (v0.1.0a74). I could not reproduce.

I am going to close this because there is nothing actionable, but I am highly interested in reproducible reports of memory usage growing over time when the server is at rest or under load.

danielballan avatar Jun 01 '23 00:06 danielballan

It's worth noting that @tacaswell reproduced this in his build-bleeding-edge-CPython-and-all-libraries environment, so something in there could have been a factor here. Reason enough to wait for someone to reproduce.

danielballan avatar Jun 01 '23 00:06 danielballan