Issue in upgrading Metabase version from 0.41.1 to 0.42.0 or any other higher version

I am running metabase using metabase.jar file. currently i am running metabase on 0.41.1, i want to upgrade it to 0.42.0 or higher versions. but i am getting "ERRORmetabase.server.middleware.log - GET /api/health 503 " while upgrading and "ERRORmetabase.server.middleware.log - GET /api/health 503 " just keep on coming

2024-02-02 15:07:04,618 [main] INFO metabase.util - Maximum memory available to JVM: 48.0 GB
2024-02-02 15:07:06,773 [main] INFO metabase.util.encryption - Saved credentials encryption is DISABLED for this Metabase instance. :unlock:
2024-02-02 15:07:11,937 [main] INFO metabase.driver.impl - Registered abstract driver :sql :truck:
2024-02-02 15:07:11,947 [main] INFO metabase.driver.impl - Registered abstract driver :sql-jdbc (parents: [:sql]) :truck:
2024-02-02 15:07:11,952 [main] INFO metabase.util - Load driver :sql-jdbc took 97.0 ms
2024-02-02 15:07:11,953 [main] INFO metabase.driver.impl - Registered driver :h2 (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:11,994 [main] INFO metabase.driver.impl - Registered driver :mysql (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:12,036 [main] INFO metabase.driver.impl - Registered driver :postgres (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:13,898 [main] INFO metabase.core -
2024-02-02 15:07:13,908 [main] INFO metabase.core - Starting Metabase in STANDALONE mode
2024-02-02 15:07:13,976 [main] INFO metabase.server - Launching Embedded Jetty Webserver with config:
2024-02-02 15:07:14,029 [main] INFO metabase.core - Starting Metabase version v0.47.13 (1b6582a ?) ...
2024-02-02 15:07:14,048 [main] INFO metabase.core - System info:
2024-02-02 15:07:14,050 [main] INFO metabase.plugins - Loading plugins in /opt/metabase/prod/plugins...
2024-02-02 15:07:14,247 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :googleanalytics...
2024-02-02 15:07:14,248 [main] INFO metabase.driver.impl - Registered driver :googleanalytics :truck:
2024-02-02 15:07:14,253 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :sqlserver...
2024-02-02 15:07:14,254 [main] INFO metabase.driver.impl - Registered driver :sqlserver (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:14,258 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :redshift...
2024-02-02 15:07:14,259 [main] INFO metabase.driver.impl - Registered driver :redshift (parents: [:postgres]) :truck:
2024-02-02 15:07:14,261 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :google...
2024-02-02 15:07:14,261 [main] INFO metabase.driver.impl - Registered abstract driver :google :truck:
2024-02-02 15:07:14,265 [main] INFO metabase.plugins.dependencies - Metabase cannot initialize plugin Metabase Vertica Driver due to required dependencies. Metabase requires the Vertica JDBC driver in order to connect to Vertica databases, but we can't ship it as part of Metabase due to licensing restrictions. See Redirecting… for more details.
2024-02-02 15:07:14,266 [main] INFO metabase.plugins.dependencies - Metabase Vertica Driver dependency {:class com.vertica.jdbc.Driver} satisfied? false
2024-02-02 15:07:14,267 [main] INFO metabase.plugins.dependencies - Plugins with unsatisfied deps: ["Metabase Vertica Driver"]
2024-02-02 15:07:14,270 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :druid...
2024-02-02 15:07:14,271 [main] INFO metabase.driver.impl - Registered driver :druid :truck:
2024-02-02 15:07:14,278 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :bigquery-cloud-sdk...
2024-02-02 15:07:14,278 [main] INFO metabase.driver.impl - Registered driver :bigquery-cloud-sdk (parents: [:sql]) :truck:
2024-02-02 15:07:14,288 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :presto-jdbc...
2024-02-02 15:07:14,288 [main] INFO metabase.driver.impl - Registered driver :presto-jdbc (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:14,300 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :snowflake...
2024-02-02 15:07:14,301 [main] INFO metabase.driver.impl - Registered driver :snowflake (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:14,303 [main] INFO metabase.plugins.dependencies - Plugin 'Metabase Presto Driver' depends on plugin 'Presto Common Driver'
2024-02-02 15:07:14,304 [main] INFO metabase.plugins.dependencies - Metabase Presto Driver dependency {:plugin Presto Common Driver} satisfied? false
2024-02-02 15:07:14,304 [main] INFO metabase.plugins.dependencies - Plugins with unsatisfied deps: ["Metabase Presto Driver" "Metabase Vertica Driver"]
2024-02-02 15:07:14,306 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :presto-common...
2024-02-02 15:07:14,306 [main] INFO metabase.driver.impl - Registered abstract driver :presto-common :truck:
2024-02-02 15:07:14,307 [main] INFO metabase.plugins.dependencies - Metabase Presto Driver dependency {:plugin Presto Common Driver} satisfied? true
2024-02-02 15:07:14,307 [main] DEBUGmetabase.plugins.initialize - Dependencies satisfied; these plugins will now be loaded: ["Metabase Presto Driver"]
2024-02-02 15:07:14,308 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :presto...
2024-02-02 15:07:14,309 [main] INFO metabase.driver.impl - Registered driver :presto (parents: [:presto-common]) :truck:
2024-02-02 15:07:14,312 [main] INFO metabase.plugins.dependencies - Metabase cannot initialize plugin Metabase Oracle Driver due to required dependencies. Metabase requires the Oracle JDBC driver in order to connect to Oracle databases, but we can't ship it as part of Metabase due to licensing restrictions. See Redirecting… for more details.
2024-02-02 15:07:14,312 [main] INFO metabase.plugins.dependencies - Metabase Oracle Driver dependency {:class oracle.jdbc.OracleDriver} satisfied? false
2024-02-02 15:07:14,313 [main] INFO metabase.plugins.dependencies - Plugins with unsatisfied deps: ["Metabase Oracle Driver" "Metabase Vertica Driver"]
2024-02-02 15:07:14,315 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :sqlite...
2024-02-02 15:07:14,315 [main] INFO metabase.driver.impl - Registered driver :sqlite (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:14,320 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :athena...
2024-02-02 15:07:14,321 [main] INFO metabase.driver.impl - Registered driver :athena (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:14,324 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :hive-like...
2024-02-02 15:07:14,325 [main] INFO metabase.driver.impl - Registered abstract driver :hive-like (parents: [:sql-jdbc]) :truck:
2024-02-02 15:07:14,325 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :sparksql...
2024-02-02 15:07:14,326 [main] INFO metabase.driver.impl - Registered driver :sparksql (parents: [:hive-like]) :truck:
2024-02-02 15:07:14,330 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :mongo...
2024-02-02 15:07:14,331 [main] INFO metabase.driver.impl - Registered driver :mongo :truck:
2024-02-02 15:07:14,332 [main] INFO metabase.plugins.dependencies - Plugin 'Metabase BigQuery Driver' depends on plugin 'Metabase Google Drivers Shared Dependencies'
2024-02-02 15:07:14,333 [main] INFO metabase.plugins.dependencies - Metabase BigQuery Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? true
2024-02-02 15:07:14,333 [main] WARN metabase.plugins.lazy-loaded-driver - Warning: plugin manifest for :bigquery does not include connection properties
2024-02-02 15:07:14,334 [main] DEBUGmetabase.plugins.lazy-loaded-driver - Registering lazy loading driver :bigquery...
2024-02-02 15:07:14,334 [main] INFO metabase.driver.impl - Registered driver :bigquery (parents: [:sql :google]) :truck:
2024-02-02 15:07:14,335 [main] INFO metabase.core - Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
2024-02-02 15:07:14,338 [main] INFO metabase.db.setup - Verifying mysql Database Connection ...
2024-02-02 15:07:14,766 [main] INFO metabase.db.setup - Successfully verified MySQL 8.0.34 application database connection. :white_check_mark:
2024-02-02 15:07:14,768 [main] INFO metabase.db.setup - Running Database Migrations...
2024-02-02 15:07:14,770 [main] INFO metabase.db.setup - Setting up Liquibase...
2024-02-02 15:07:14,816 [qtp640787401-50] ERRORmetabase.server.middleware.log - GET /api/health 503 2.7 ms (0 DB calls)
2024-02-02 15:07:15,049 [main] INFO metabase.db.setup - Liquibase is ready.
2024-02-02 15:07:15,050 [main] INFO metabase.db.liquibase - Checking if Database has unrun migrations...
2024-02-02 15:07:15,707 [qtp640787401-45] ERRORmetabase.server.middleware.log - GET /api/health 503 439.0 µs (0 DB calls)
2024-02-02 15:07:16,433 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,434 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,434 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,434 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,435 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,435 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,435 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,436 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,436 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,436 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,437 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:16,450 [main] INFO metabase.db.liquibase - Database has unrun migrations. Waiting for migration lock to be cleared...
2024-02-02 15:07:16,707 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 292.4 µs (0 DB calls)
2024-02-02 15:07:17,000 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,001 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,001 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,001 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,002 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,002 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,003 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,003 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,003 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,004 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,004 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,013 [main] INFO metabase.db.liquibase - Migration lock is cleared. Running migrations...
2024-02-02 15:07:17,619 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,620 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,620 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,620 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,621 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,621 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,621 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,622 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,622 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,622 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,622 [main] WARN liquibase.changelog - modifyDataType will lose primary key/autoincrement/not null settings for mysql. Use and re-specify all configuration if this is the case
2024-02-02 15:07:17,667 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 415.3 µs (0 DB calls)
2024-02-02 15:07:18,702 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 239.3 µs (0 DB calls)
2024-02-02 15:07:20,176 [qtp640787401-48] ERRORmetabase.server.middleware.log - GET /api/health 503 182.7 µs (0 DB calls)
2024-02-02 15:07:21,591 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 207.6 µs (0 DB calls)
2024-02-02 15:07:22,690 [qtp640787401-48] ERRORmetabase.server.middleware.log - GET /api/health 503 152.4 µs (0 DB calls)
2024-02-02 15:07:23,717 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 176.0 µs (0 DB calls)
2024-02-02 15:07:24,670 [qtp640787401-48] ERRORmetabase.server.middleware.log - GET /api/health 503 139.4 µs (0 DB calls)
2024-02-02 15:07:25,665 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 126.3 µs (0 DB calls)
2024-02-02 15:07:26,741 [qtp640787401-48] ERRORmetabase.server.middleware.log - GET /api/health 503 119.2 µs (0 DB calls)
2024-02-02 15:07:27,736 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 237.1 µs (0 DB calls)
2024-02-02 15:07:28,714 [qtp640787401-48] ERRORmetabase.server.middleware.log - GET /api/health 503 993.4 µs (0 DB calls)
2024-02-02 15:07:29,684 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 523.4 µs (0 DB calls)
2024-02-02 15:07:30,724 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 200.5 µs (0 DB calls)
2024-02-02 15:07:31,590 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 150.2 µs (0 DB calls)
2024-02-02 15:07:32,597 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 216.7 µs (0 DB calls)
2024-02-02 15:07:33,600 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 156.7 µs (0 DB calls)
2024-02-02 15:07:34,593 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 120.9 µs (0 DB calls)
2024-02-02 15:07:35,591 [qtp640787401-45] ERRORmetabase.server.middleware.log - GET /api/health 503 167.3 µs (0 DB calls)
2024-02-02 15:07:36,590 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 120.0 µs (0 DB calls)
2024-02-02 15:07:37,600 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 157.5 µs (0 DB calls)
2024-02-02 15:07:38,589 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 106.5 µs (0 DB calls)
2024-02-02 15:07:39,590 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 194.7 µs (0 DB calls)
2024-02-02 15:07:40,595 [qtp640787401-44] ERRORmetabase.server.middleware.log - GET /api/health 503 106.9 µs (0 DB calls)
2024-02-02 15:07:41,594 [qtp640787401-50] ERRORmetabase.server.middleware.log - GET /api/health 503 107.6 µs (0 DB calls)
2024-02-02 15:07:42,591 [qtp640787401-45] ERRORmetabase.server.middleware.log - GET /api/health 503 91.7 µs (0 DB calls)
2024-02-02 15:07:43,594 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 112.3 µs (0 DB calls)
2024-02-02 15:07:44,622 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 108.1 µs (0 DB calls)
2024-02-02 15:07:45,601 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 271.4 µs (0 DB calls)
2024-02-02 15:07:46,594 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 110.9 µs (0 DB calls)
2024-02-02 15:07:47,650 [qtp640787401-45] ERRORmetabase.server.middleware.log - GET /api/health 503 172.1 µs (0 DB calls)
2024-02-02 15:07:48,683 [qtp640787401-51] ERRORmetabase.server.middleware.log - GET /api/health 503 152.3 µs (0 DB calls)
2024-02-02 15:07:49,602 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 145.4 µs (0 DB calls)
2024-02-02 15:07:50,594 [qtp640787401-44] ERRORmetabase.server.middleware.log - GET /api/health 503 119.4 µs (0 DB calls)
2024-02-02 15:07:51,592 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 121.0 µs (0 DB calls)
2024-02-02 15:07:52,595 [qtp640787401-50] ERRORmetabase.server.middleware.log - GET /api/health 503 113.7 µs (0 DB calls)
2024-02-02 15:07:53,594 [qtp640787401-44] ERRORmetabase.server.middleware.log - GET /api/health 503 124.3 µs (0 DB calls)
2024-02-02 15:07:54,595 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 173.4 µs (0 DB calls)
2024-02-02 15:07:55,635 [qtp640787401-44] ERRORmetabase.server.middleware.log - GET /api/health 503 191.0 µs (0 DB calls)
2024-02-02 15:07:56,595 [qtp640787401-46] ERRORmetabase.server.middleware.log - GET /api/health 503 125.2 µs (0 DB calls)
2024-02-02 15:07:57,599 [qtp640787401-44] ERRORmetabase.server.middleware.log - GET /api/health 503 134.0 µs (0 DB calls)
2024-02-02 15:07:58,601 [qtp640787401-49] ERRORmetabase.server.middleware.log - GET /api/health 503 101.0 µs (0 DB calls)
2024-02-02 15:07:59,599 [qtp640787401-44] ERRORmetabase.server.middleware.log - GET /api/health 503 146.1 µs (0 DB calls)

What version of MySQL?

Hi @AndrewMBaines,we are usingn MySQL 8.0.34

the upgrade process on MySQL takes time, how much time have you waited? how big are your tables?

Luiggi - is Postgres significantly better in this respect?

@Luiggi, i waited for more than an hour

A million times

1 Like

Send the size of the tables please, and version which you’re upgrading from/to

@Luiggi, the total size of the db is around 52 GB, and we are currently running on 0.41.10 and trying to upgrade it to 0.48.3

table wise size in MB

query_cache ----> |39181.33|
query -----> |12713.89|
query_execution ------> |743.41|
revision. ---------> |25.80|
report_card -----------> |16.72|
task_history ----------> |11.55|
metabase_field --------> |2.06|
view_log ----------------> |2.03|

This is one of the reasons why we introduce automatic pruning of tables, as users normally don't do any kind of maintenance to their databases.

Please prune:
query_cache (truncate the table)
query: leave only the queries of the last week/month
query_execution: leave only the queries of the last week/month

then try the migration again

Thank you so much @Luiggi for the solution.