python-dotenv
python-dotenv copied to clipboard
Too many open files
/lib/python3.11/site-packages/dotenv/main.py", line 56, in _get_stream OSError: [Errno 24] Too many open files: '.env'
Tried updating ulimit but issue remains same.
I have checked the following methods and no error occurred. Ubuntu 20.04 python3.11
$ ulimit -n
1024
.env
TESTVALUE=foo
I tried the parse method because the parse method uses the _get_stream method.
main.py
from dotenv.main import DotEnv
dotenv = DotEnv("./.env")
print(list(dotenv.parse()))
@theskumar @kamranisbest I'd be grateful for your feedback on @otoyuzu705's comment. I helped him with his investigation.
It would be quite challenging for me to assist unless there's a way to replicate the issue. If you're certain it's a problem with this package, I'd be eager to help if there's a way to recreate it.