Closed matthewlloyd closed 4 years ago
Hi There is an environment variable called ECCODES_FILE_POOL_MAX_OPENED_FILES.
The user can set this to an integer value e.g. export ECCODES_FILE_POOL_MAX_OPENED_FILES=0
This will ensure no file is kept open.
Steps to reproduce:
After running this code, the gribtest file handle is still open:
This file handle leak isn't normally a problem, but when processing lots of files that get downloaded then deleted after processing, it consumes disk space quickly because the OS doesn't free the space until the file is actually closed by the process.
I'm using eccodes version 2.17.0. I'm not sure whether the issue is in the high-level Python API code (which looks correct), or in the underlying eccodes library.