Dashboard not loading "metabase.query-processor.middleware.process-userland-query Query failure"

Hi,

I've just installed metabase using Jar on a Digital Ocean Droplet.

It seems to work at the beginning, I can connect to my database, and create some questions without error.

But very soon, I have an error.

The dashboard is in an infinite loading state.

Here is my config

{
  "browser-info": {
    "language": "fr-FR",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "1.8.0_292-8u292-b10-0ubuntu1~20.04-b10",
    "java.vendor": "Private Build",
    "java.vendor.url": "http://java.oracle.com/",
    "java.version": "1.8.0_292",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "25.292-b10",
    "os.name": "Linux",
    "os.version": "5.4.0-88-generic",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "tag": "v0.34.2",
      "date": "2020-02-04",
      "branch": "release-0.34.x",
      "hash": "dab738c"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Here is the error

[e0a6757a-0655-4a08-a68f-55c8788fa6ba] 2021-11-27T23:27:09+01:00 ERROR metabase.driver.sql-    jdbc.execute nil
[e0a6757a-0655-4a08-a68f-55c8788fa6ba] 2021-11-27T23:27:10+01:00 WARN metabase.query-processor.middleware.process-userland-query Query failure {:status :failed,
:class java.sql.SQLException,
:error "An SQLException was provoked by the following failure: java.lang.InterruptedException",
:stacktrace
("com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)"
"com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)"
"com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:74)"
"com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:694)"
"com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)"
"clojure.java.jdbc$get_connection.invokeStatic(jdbc.clj:372)"
"clojure.java.jdbc$get_connection.invoke(jdbc.clj:274)"
"clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:833)"
"clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:769)"
"clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:782)"
"clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:769)"
"--> driver.sql_jdbc.execute$do_in_transaction.invokeStatic(execute.clj:276)"
"driver.sql_jdbc.execute$do_in_transaction.invoke(execute.clj:275)"
"driver.sql_jdbc.execute$run_query_without_timezone.invokeStatic(execute.clj:300)"
"driver.sql_jdbc.execute$run_query_without_timezone.invoke(execute.clj:299)"
"driver.sql_jdbc.execute$execute_query$fn__69410.invoke(execute.clj:338)"
"driver.sql_jdbc.execute$do_with_try_catch.invokeStatic(execute.clj:252)"
"driver.sql_jdbc.execute$do_with_try_catch.invoke(execute.clj:246)"
"driver.sql_jdbc.execute$execute_query.invokeStatic(execute.clj:332)"
"driver.sql_jdbc.execute$execute_query.invoke(execute.clj:325)"
"driver.sql_jdbc$fn__71316.invokeStatic(sql_jdbc.clj:49)"
"driver.sql_jdbc$fn__71316.invoke(sql_jdbc.clj:47)"
"query_processor$fn__46335$execute_query__46340$fn__46341.invoke(query_processor.clj:69)"
"query_processor$fn__46335$execute_query__46340.invoke(query_processor.clj:64)"
"query_processor.middleware.mbql_to_native$mbql__GT_native$fn__37455.invoke(mbql_to_native.clj:40)"
"query_processor.middleware.annotate$result_rows_maps__GT_vectors$fn__40562.invoke(annotate.clj:541)"
"query_processor.middleware.annotate$add_column_info$fn__40468.invoke(annotate.clj:485)"
"query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__41503.invoke(cumulative_aggregations.clj:57)"
"query_processor.middleware.resolve_joins$resolve_joins$fn__43430.invoke(resolve_joins.clj:184)"
"query_processor.middleware.limit$limit$fn__42138.invoke(limit.clj:19)"
"query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__46195.invoke(results_metadata.clj:87)"
"query_processor.middleware.format_rows$format_rows$fn__42126.invoke(format_rows.clj:76)"
"query_processor.middleware.add_dimension_projections$add_remapping$fn__38215.invoke(add_dimension_projections.clj:234)"
"query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__38866.invoke(add_source_metadata.clj:107)"
"query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43480.invoke(resolve_source_table.clj:46)"
"query_processor.middleware.add_row_count_and_status$add_row_count_and_status$fn__38703.invoke(add_row_count_and_status.clj:16)"
"query_processor.middleware.driver_specific$process_query_in_context$fn__41578.invoke(driver_specific.clj:12)"
"query_processor.middleware.resolve_driver$resolve_driver$fn__43094.invoke(resolve_driver.clj:22)"
"query_processor.middleware.store$initialize_store$fn__46220$fn__46221.invoke(store.clj:11)"
"query_processor.store$do_with_store.invokeStatic(store.clj:46)"
"query_processor.store$do_with_store.invoke(store.clj:40)"
"query_processor.middleware.store$initialize_store$fn__46220.invoke(store.clj:10)"
"query_processor.middleware.async$async__GT_sync$fn__37366.invoke(async.clj:23)"
"query_processor.middleware.async_wait$runnable$fn__40619.invoke(async_wait.clj:89)"),
:query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:userland-query? true},
:info
{:executed-by 1,
:context :question,
:card-id 1,
:dashboard-id nil,
:query-hash [2, 49, 50, -29, 123, 119, 99, 33, 66, -75, 26, 46, -5, 61, -1, 104, 26, 68, 55, -3, -60, 25, -110, -85, 118, -35, 96, -76, 53, -48, 36, -68]},
:query {:source-table 50, :filter [:!= [:fk-> [:field-id 390] [:field-id 286]] 8], :aggregation [[:count]], :breakout [[:datetime-field [:field-id 389] :month]]},
:parameters [],
:async? true,
:cache-ttl nil},
:preprocessed
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:userland-query? true},
:info
{:executed-by 1,
:context :question,
:card-id 1,
:query-hash [2, 49, 50, -29, 123, 119, 99, 33, 66, -75, 26, 46, -5, 61, -1, 104, 26, 68, 55, -3, -60, 25, -110, -85, 118, -35, 96, -76, 53, -48, 36, -68]},
:preprocessing-level 1,
:database 2,
:query
{:source-table 50,
:filter [:!= [:joined-field "stores__via__store_id" [:field-id 286]] [:value 8 {:base_type :type/BigInteger, :special_type :type/FK, :database_type "int8"}]],
:aggregation [[:aggregation-options [:count] {:name "count"}]],
:breakout [[:datetime-field [:field-id 389] :month]],
:order-by [[:asc [:datetime-field [:field-id 389] :month]]],
:joins [{:strategy :left-join, :source-table 34, :alias "stores__via__store_id", :fk-field-id 390, :condition [:= [:field-id 390] [:joined-field "stores__via__store_id" [:field-id 293]]]}]}},
:native
{:query
"SELECT date_trunc('month', CAST(\"public\".\"reports\".\"created_at\" AS timestamp)) AS \"created_at\", count(*) AS \"count\" FROM \"public\".\"reports\" LEFT JOIN \"public\".\"stores\" \"stores__via__store_id\" ON \"public\".\"reports\".\"store_id\" = \"stores__via__store_id\".\"id\" WHERE \"stores__via__store_id\".\"organisation_id\" <> 8 GROUP BY date_trunc('month', CAST(\"public\".\"reports\".\"created_at\" AS timestamp)) ORDER BY date_trunc('month', CAST(\"public\".\"reports\".\"created_at\" AS timestamp)) ASC",
:params nil},
:cause {:class java.lang.InterruptedException, :error "java.lang.InterruptedException"}}

Thanks a lot for your help.

Hi @adrilef

  1. Latest release is 0.41.2 - almost two years newer than 0.34:
    https://github.com/metabase/metabase/releases/latest
  2. You should not be using H2 as the application database if you're running Metabase in production:
    https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html
  3. And upgrade to Java 11:
    https://www.metabase.com/docs/latest/operations-guide/java-versions.html

Hi @flamber

Thanks for you answer.

I was obviously running an old version : https://www.cloudbooklet.com/install-metabase-on-ubuntu-18-04-with-nginx-and-ssl-google-cloud/

It works a lot better now ! Thanks