DB migration hangs

I am trying to migrate H2 database to mysql and migration is stuck after this message. Is there way to check additional logs or anyone came across this issue?

2023-01-04 13:04:49,210 INFO db.setup :: Database Migrations Current ... :white_check_mark:

2023-01-04 13:04:49,211 INFO db.data-migrations :: Running all necessary data migrations, this may take a minute.

2023-01-04 13:04:49,221 INFO db.data-migrations :: Finished running data migrations.

2023-01-04 13:04:49,223 INFO metabase.util :: Database setup took 2.7 s

2023-01-04 13:04:49,223 INFO cmd.copy :: [OK]

2023-01-04 13:04:49,224 INFO cmd.copy :: Set up mysql target database and run migrations...

2023-01-04 13:04:49,224 INFO db.setup :: Verifying mysql Database Connection ...

2023-01-04 13:04:51,377 INFO db.setup :: Successfully verified MySQL 5.7.12 application database connection. :white_check_mark:

2023-01-04 13:04:51,378 INFO db.setup :: Running Database Migrations...

2023-01-04 13:04:51,380 INFO db.setup :: Setting up Liquibase...

2023-01-04 13:04:51,389 INFO db.setup :: Liquibase is ready.

2023-01-04 13:04:51,390 INFO db.liquibase :: Checking if Database has unrun migrations...

2023-01-04 13:04:52,630 INFO db.liquibase :: Database has unrun migrations. Waiting for migration lock to be cleared...

2023-01-04 13:04:52,835 INFO db.liquibase :: Migration lock is cleared. Running migrations...

2023-01-04 13:05:29,698 INFO db.setup :: Database Migrations Current ... :white_check_mark:

2023-01-04 13:05:29,699 INFO metabase.util :: Database setup took 40.5 s

2023-01-04 13:05:29,699 INFO cmd.copy :: [OK]

2023-01-04 13:05:29,700 INFO cmd.copy :: Testing if target mysql database is already populated...

2023-01-04 13:05:29,701 INFO cmd.copy :: [OK]

2023-01-04 13:05:29,702 INFO cmd.copy :: Clearing default entries created by Liquibase migrations...

2023-01-04 13:05:29,703 INFO cmd.copy :: Temporarily disabling DB constraints...

2023-01-04 13:05:29,707 INFO cmd.copy :: [OK]

Hi @kituvenkat
Depending on the size of your H2, then it can take anywhere from a few seconds to many minutes.
You should see CPU activity on the Metabase process and query activity on your MySQL server.

Thanks @flamber. I left it for an hour and nothing happened and there was no CPU activity. I ended up using PostgreSQL instead and it worked fine. I wonder if it has anything to do with Aurora MySQL. I am good for now.

@kituvenkat You'll need to add usePipelineAuth=false&useBatchMultiSend=false to your connection string if you are using Aurora MySQL for the application database.

1 Like