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

Database connection stay in memory while killing the process (windows) #160

Open
instasck opened this issue Oct 1, 2022 · 4 comments
Open
Labels
help-needed PRs for this issue are most welcome

Comments

@instasck
Copy link

instasck commented Oct 1, 2022

please check singlton
pycontribs/tendo#55

So sending a kill signal to process with sqlitedict will not close (not all the time) the db connection and the proccess can hang forever.
Causing the "singlton" lock file to no be removed.

What can cause it ?

@instasck
Copy link
Author

@mpenkov do you know if I can close connection to DB after commit, and open when write ?
since connection is open all the time - the file is locked while proccess on

@mpenkov
Copy link
Collaborator

mpenkov commented Nov 25, 2022

I don't think so, but why not try it and see?

@instasck
Copy link
Author

instasck commented Jun 21, 2023

image
This is the locking I use.
With sqlitedict I get the process stuck in memmory for up to 10 minute.
Without sqlitedict it removing this file immediatly:
image
So if no fix fore that I wil lswitch to peewee ...

I also do
for table in self.list_of_tables_user_data:
self.user_data[table].close()

at the end of my process

@instasck
Copy link
Author

@mpenkov
image
This is an example for the issue. all those db are file locked in, while process should been exit already.
How can I close the connection with auto-commit ?
I am also useing to peewee and sqlite3 and I dont see that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-needed PRs for this issue are most welcome
Projects
None yet
Development

No branches or pull requests

2 participants