omnilib/aiosqlite

Too many open file even after closing Connection: Question

Nebulizer1213 opened this issue · 1 comments

I get the too many open files error on Linux when I used aiosqlite because I would open a new connection every time I wanted to do something. I fixed it now by using a global connection, but I'm still not sure why I got the error because I always used aiosqlite.connect() with a context manager, so why would I get the error?

I'm seeing similar behavior on Windows using sqlalchemy with async engine and aiosqlite. Windows reports the process as holding many handles to the database even when all sessions have been closed (there seems to be some case where a handle isn't released? Some are released, but over time the number grows)