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

Problem: SQLite Write Lock #6

Closed
ansibleguy opened this issue Feb 23, 2024 · 3 comments
Closed

Problem: SQLite Write Lock #6

ansibleguy opened this issue Feb 23, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ansibleguy
Copy link
Owner

ansibleguy commented Feb 23, 2024

Versions

latest

Scope

Backend (API)

Issue

Since implementing the repository functionality we randomly see OperationalError: database is locked errors occurring.
It looks like some write operation locks the database for multiple seconds.
SQLite only supports one write-operation at a time. This is a known limitation.
We should not run into that limitation for some time. The writes we perform are not data-intensive and should easily be done in < 0.1s

@ansibleguy ansibleguy added the bug Something isn't working label Feb 23, 2024
@ansibleguy ansibleguy self-assigned this Feb 23, 2024
@ansibleguy
Copy link
Owner Author

ansibleguy commented Feb 23, 2024

Seems there was a recent change that could help with that behavior: django/django@a0204ac (but it can still take some time until that becomes available)

The root issue is described in the ticket: https://code.djangoproject.com/ticket/29280

@ansibleguy
Copy link
Owner Author

ansibleguy commented Feb 23, 2024

Probably resolved for now. Will re-open if recurring

@NiceRath
Copy link

NiceRath commented Mar 1, 2024

Had this one over night - the whole service was essentially stuck.
As a workaround: Maybe have one thread check for this issue and fail/restart the service if stuck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants