Skip to content

Database is locked #678

Description

@Orygin

gonic version: v0.20.1

if from docker, docker tag: latest

Issue:

Just installed gonic for the first time. Used the example docker compose to run it.
After starting the first scan, the application became unavailable. Logs indicate the sqlite database is locked.
After restarting the service and starting a new scan, the same thing happens and the server becomes unavailable.

version: "2.4"
services:
  gonic:
    image: sentriz/gonic:latest
    environment:
      - TZ
      # optionally, see more available env vars in the readme
    ports:
      - 4747:80
    volumes:
      - /volume1/docker/appdata/gonic/data:/data # gonic db etc
      - /volume1/data/media/music/:/music:ro # your music
      - /volume1/docker/appdata/gonic/playlists:/playlists # your playlists
      - /volume1/docker/appdata/gonic/cache:/cache # transcode / covers / etc cache dir

Logs:

2026/03/29 14:40:12 response 500 GET /home 
gorm error/go/pkg/mod/github.com/sentriz/gormstore@v0.0.0-20220105134332-64e31f7f6981/gormstore.go:177sqlite3: database is locked

Edit:
After looking some more, I guess this is related to the limitation of directory structure as explained in the README.
The last folder shown scanned (idk if it's the last, or just when the issue triggers) has a dump of an artist soundcloud, so nothing is sorted by albums (and moreso, no albums as most of the tracks are live sets).
I guess Gonic cannot support this use case? But even so, I guess it shouldn't freeze like this for unsupported structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions