Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make only a single database connection and close it when you're done with it. #131

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bethac07
Copy link
Member

For cases with more than a few hundred CSVs, in 0.3.3 we've been getting SQLite writing failures with variants of OSError: [Errno 24] Too many open files: '/tmp/tmpyzcy0lbx' . This seems to be due to that, when we moved to SQAlchemy from odo, connection generation was added without closing, and it was .

I've tested both creating the connections from a null pool and then closing the connections a) just where they were, in into, and b) once per set, in seed; the latter seems to be about 5% faster, so that's the change I'm looking to pull, but if for whatever reason we want to do it inside into in the future that seems to be also fine!

@marcosterland
Copy link

I've encountered the same issue. It was solved with your fix.
Thanks! :)

@d33bs
Copy link
Member

d33bs commented Oct 10, 2024

Wanted to comment just in case that these changes appear to have gone into cytominer-database release v0.3.4 . We've also just merged these into master via #135 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants