Skip to content

locked sqlite db? #103

@jonathanstrong

Description

@jonathanstrong

ran into an issue where shutting down the server with ctrl-c seems to have left the sqlite database in a "locked" state that alexandrie could not recover from on restart.

the log message that displayed is:

Feb 24 13:55:31.950 INFO --> GET /api/v1/crates/my-crate/0.3.15/download 200 1ms , SQL error: database is locked, version: 0.1.0 

I recovered by running the command

echo '.dump' | sqlite3 old.db | sqlite3 new.db

and switching to new.db in my config file.

I don't know exactly what happened to leave the sqlite file in locked state, however, I had just restarted the alexandrie server immediately prior to this, and had not opened the sqlite db manually or otherwise tinkered with the file.

Metadata

Metadata

Labels

C-bugCategory: BugM-apiModule: Programmatic APIP-highPriority: High

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions