#Migration table is already locked

2 messages · Page 1 of 1 (latest)

astral ether
#

Hi,

I am trying to deploy backstage to AWS ECS + Fargate + PG

Following the getting started guide, I scaffolded the app with:

npx @backstage/create-app

I only run 1 copy of the image as an ECS Task so there should not be a race condition with another container/task. Yet, this is what I see in the logs when it tries to start up:

MigrationLocked: Plugin 'catalog' startup failed; caused by MigrationLocked: Migration table is already locked

Any ideas on what's wrong? (i did this yesterday 2024-08-27) and haven't played with Backstage before so everything should be latest as per the scaffolder's opinion as of yesterday.

Any pointers are welcome, thanks!

subtle wedge
#

Perhaps one task booted up and crashed when it was starting. You have a few options I think:

  • drop the whole catalog database.. if you are happy to lose all of the data in there.
  • if you are sure there are no other migrations running somewhere else you could remove the migration lock by using: "DELETE FROM knex_migrations_lock WHERE id <> 0;"