Skip to content

Second Grafana instance crashes after boot - failed to obtain lock #1

@danstadler-pdx

Description

@danstadler-pdx

Hi, I've been looking around for a docker-compose project that starts up Grafana in HA mode; several of them have had certain issues preventing from just starting up OOTB.

Your project gets pretty close, but the second Grafana instance crashes after boot. Here are the last 3 log lines from that container:

logger=sqlstore t=2025-07-30T18:37:43.342033808Z level=info msg="Connecting to DB" dbtype=postgres
logger=migrator t=2025-07-30T18:37:43.360496173Z level=info msg="Locking database"
logger=migrator t=2025-07-30T18:37:43.36327447Z level=error msg="Failed to lock database" error="failed to obtain lock"
Error: ✗ failed to obtain lock

Does this happen for you, and do you have an easy fix I can implement?

My setup:

  • fork your project in GitHub
  • open a Codespace on main
  • run docker compose up -d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions