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: Memory leaks when read las file

See original GitHub issue

Hi,

I noticed that when I try to read many LAS files in loop the memory leaks is significant. I use the following code:

from welly import Well
from os import listdir
from os.path import isfile, join


p = r'/some/path'
files = [f for f in listdir(p) if isfile(join(p, f))]

for f in files:
    if f.startswith('.'):
        continue
    w = Well.from_las(p + '/' + f, index='meter')

As input data I use Teapot Dome

I’m not sure whether the leaking module is welly or lasio but I decided to report it here as I use welly.

Welly version: 0.4.10 Python: 3.6.7 Ubuntu 20.04

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kinverarity1commented, Jan 15, 2022

@kerim371 please feel free to open this issue on the lasio tracker. Clearly not a welly issue.

1reaction
kwinkunkscommented, Jan 6, 2022

Indeed, you cannot delete an item from a project – I have fixed this in the develop branch, it will be in the next release.

It occurs to me that del is not guaranteed to actually remove things from memory, only from the namespace. To remove from memory, I think you need to invoke the garbage collector explicitly. See https://docs.python.org/3/library/gc.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory leak when iterating through las files · Issue #32 - GitHub
Memory allocated to Python continually increases as I sequentially iterate over the filenames, open the files in read mode, use data from ...
Read more >
Incident report on memory leak caused by Cloudflare parser bug
It turned out that the underlying bug that caused the memory leak had been present in our Ragel-based parser for many years but...
Read more >
This Windows 11 Bug is Exactly Why I'm Waiting to Upgrade
A memory leak is when a program takes up memory and doesn't release it once you close the window. Essentially, it eats up...
Read more >
[WT-5688] Memory leak detected during page overflow read ...
Below meomry leak was captured by the format-stress-sanitizer-smoke-test while attempting a page overflow read. This test started to fail from the merge ...
Read more >
Monterey's memory leak and how to avoid it
The leak appears to occur when the pointer type changes, for example from a standard arrow to an I-beam for the insertion of...
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