Skip to content

ci: stop services before database writes to prevent SQLite lock - #137

Merged
libgoncalv merged 1 commit into
mainfrom
fix/stop-services-before-db-writes
Jun 23, 2026
Merged

libgoncalv merged 1 commit into
mainfrom
fix/stop-services-before-db-writes

Conversation

@libgoncalv

Copy link
Copy Markdown
Collaborator

Summary

Stop the Daphne webserver and runner services before running use-case installations, and start them again afterward.

Why

The previous fix (running sharpie-install from the webserver/ directory) resolved the "no such table" error by pointing to the correct database file. However, it exposed a new error: sqlite3.OperationalError: database is locked. SQLite only allows one writer at a time, and the running Daphne process was holding a write lock on db.sqlite3 during use-case installation.

By stopping services before database writes and starting them after, we eliminate concurrent write access to the SQLite database.

@libgoncalv
libgoncalv merged commit ec45a3d into main Jun 23, 2026
2 of 3 checks passed
@libgoncalv
libgoncalv deleted the fix/stop-services-before-db-writes branch June 23, 2026 15:28
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.

1 participant