BUG: Memory leaks when read las file
See original GitHub issueHi,
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:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top 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 >
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
@kerim371 please feel free to open this issue on the lasio tracker. Clearly not a welly issue.
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