Node memory issues - Migration lock

I’m using docker container, and was trying to upgrade to new image from 5.119 to latest release and the docker container keeps rebooting with this error below. MySQL shows no migration locks in the table.

ERROR Migration lock was never released or currently a migration is running.
Migration lock was never released or currently a migration is running.

“If you are sure no migration is running, check your data and if your database is in a broken state, you could run yarn knex-migrator rollback.”

Error ID: 500

My SQL v.8

Select * from migrations_lock; → No records// No locks at the database level

Server specs - 64GB RAM, 50GB allocated to NODE (v20) via docker compose

  • NODE_OPTIONS=–max-old-space-size=50000

Total Ghost posts - 60,000

Is it possible to disable this migration step or lock check? My production site is down now :frowning:

Do I need to do a fresh reinstall or is there any hope?

Have a look here:

Are you sure migrations_lock is empty? That would be unusual, since there should always be an entry – the “lock” itself is controlled with the locked table.

(also, cc-ing people is a bit odd – two of the accounts you mentioned have not been active here in years)

Thank you for your response. I cc’d users after seeing their posts with the same error and was hoping to get their attention. I was able to to recover my site using mysqldump import/export. But seems like it is a core limitation of Ghost CMS with large posts. The JSON.Stringify() limits prevents users from doing an export of all content via the admin UI. The same function causes lockups during database migrations because Ghost tries to create a backup (ghost/core/core/server/data/db/backup.js) before the migration, which never happens because of the hard limit and you are stuck in a loop.

It seems like a bug, which was reported on Github but never fixed.