// troubleshooting guide · metabase

Metabase 'Database Has Migration Lock' After Upgrade

Status
Workaround available
platforms:
Self-hosted
updated:
November 16, 2026
reports:
3
Method
how we research
Share

RUNBOOK · metabase/migration-lock4 FIXES

// quick answer

A previous upgrade or crash left a lock in the application database, so Metabase refuses to start. Make sure no other instance is running, back up the database, then release the lock with java -jar metabase.jar migrate release-locks.

Most likely fix: Stop every other instance

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Stop every other instance

    1. 01Scale to a single Metabase instance
    2. 02Confirm no other container is connected to the application database
    Did this fix it?
  2. FIX 2Back up, then release the lock

    1. 01Back up the application database
    2. 02Run java -jar metabase.jar migrate release-locks with the same MB_DB_* settings
    3. 03Start Metabase normally
    Did this fix it?
  3. FIX 3Give migrations time

    1. 01Raise your orchestrator's health-check or startup timeout
    2. 02Watch docker logs until migrations finish
    Did this fix it?
  4. FIX 4Read the first error, not the last

    1. 01Search the logs for the first ERROR line
    2. 02If a migration partly applied, restore the backup and upgrade again, or post the error on the Metabase forum
    Did this fix it?

SANDBOX · metabase RUNS IN YOUR BROWSER

Try it: browse a sample shop and watch visitors, funnels and live data arrive

A hands-on Metabase-style sandbox, including the spots where users get stuck. See where problems like this one start. 1-2 minutes, nothing is saved.

Symptoms

Metabase won't start after an upgrade; logs repeat 'Database has migration lock; cannot run migrations' or 'Could not acquire change log lock'.

Why it happens

  • C-01Upgrade interrupted or container killed mid-migration
  • C-02Two Metabase instances migrating the same database
  • C-03Health-check timeout killing the container during a long migration
  • C-04A migration that partly applied (for example a table that already exists)

// this guide also covers

  • metabase migration lock
  • metabase could not acquire change log lock
  • metabase upgrade failed
  • metabase won't start after upgrade

Still not working?

If Metabase keeps failing, you're not alone. See every Metabase problem users report or the alternatives people switch to.

Done fighting Metabase? Our small team builds your own Metabase alternative, or any software you need: web, mobile, games, desktop. Price agreed together.

Talk to us

Watch Metabase Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other Metabase errors

All 14 Metabase errors and fixes →