Metabase is unable to start after a pg_restore

Hi, I have metabase running as an ecs service backed by the community version docker image metabase/metabase:v0.50.26.1.

I was able to move data to staging environment previously using pg_restore.
I restored to the same metabase db again. Now, I notice that metabase comes up but the service seems to always fail the health check and then shuts down?

I have tried truncating the databasechangelog and databasechangeloglock tables, but this process always comes back:

     id     | author  |        dateexecuted        
------------+---------+----------------------------
 v00.00-000 | qnkhuat | 2024-11-07 12:44:07.371132
(1 row)

and

 id | locked | lockgranted | lockedby 
----+--------+-------------+----------
  1 | f      |             | 
(1 row)

Is there something specific I should look for to debug this better? Thanks...

databasechangelog is the table where we save the migrations... if you truncate that then metabase will rerun the migrations from scratch...

please restore a backup and send the logs

Thanks. Yeah I could see that in the later logs, but I figured it would just run migrations by itself if it found they were missing.

Attempts to rebuild the db didn't really work. Attempts to upgrade to latest image (in case it was a bug) also didn't work. In the end I think the CPU and RAM just weren't enough. Increasing them slightly allowed for correct startup.

After some research it also looks like my pg restore command itself soaked up what few resources there were, and it was running single-threaded too which probably exacerbated things. I will report back if I am able to run a restore successfully, in case it helps anybody else.

Thanks.
UPDATE: yeah, combination of more CPU, RAM and better use of pg_dump and pg_restore allowed for clean startup.

I'm facing the same issue

what issue?