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

Handling of locked databases #58

Open
mjnewton opened this issue Apr 24, 2021 · 0 comments
Open

Handling of locked databases #58

mjnewton opened this issue Apr 24, 2021 · 0 comments

Comments

@mjnewton
Copy link

mjnewton commented Apr 24, 2021

Since moving from mysql to sqlite3 I have been occasionally getting the following errors when running sync-cli.sh via cron:

ERROR: [5] database is locked (SQL Query: INSERT INTO "contacts_google" ("user_id", "changed", "del", "vcard", "name", "firstname", "surname", "email", "words") VALUES (14, datetime('now'), 0, 'BEGIN:VCARD [...]

I am led to believe that sqlite doesn't support multiple concurrent access with it being file based and so presumably that's what the issue is (and, specifically, that Roundcube happens to have the database locked at the time)?

I could pipe all errors to /dev/null but I'd like to know about others ('genuine' ones, if you see what I mean) that might occur. Is there any way the sync-cli.sh script could detect a locked database and handle the situation differently - perhaps retrying or backing off momentarily, if that's what required?

@mjnewton mjnewton changed the title Problems accessing locking database Handling of locked databases Apr 24, 2021
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

No branches or pull requests

1 participant