Dashboard timing out after 30 seconds

There are 27 queries on my dashboard that aren't loading, but we're only seeing the failure status for one of them. It appears the dashboard is timing out after 30 seconds.

Viewing the queries directly in a separate tab loads the query successfully. Is there something we can do to resolve this?

Screenshot of error console:

Let me know if I can provide additional information.

Hi @Hanna
Post “Diagnostic Info” from Admin > Troubleshooting.
And check the log for more detailed error - Admin > Troubleshooting > Logs.

Diagnostic info:
{
“browser-info”: {
“language”: “en-US”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.10+9”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.10”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.10+9”,
“os.name”: “Linux”,
“os.version”: “4.14.214-118.339.amzn1.x86_64”,
“user.language”: “en”,
“user.timezone”: “US/Eastern”
},
“metabase-info”: {
“databases”: [
“postgres”
],
“hosting-env”: “elastic-beanstalk”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “10.13”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.18”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2021-02-16”,
“tag”: “v0.38.0”,
“branch”: “release-x.38.x”,
“hash”: “471aa51”
},
“settings”: {
“report-timezone”: “US/Eastern”
}
}
}

Not seeing anything in the troubleshooting logs of note

@Hanna

It it used to work correctly?

But if the queries are timing out, then there should be a message in the log about that.
Otherwise post all the log line, when you visit the problematic dashboard.

Yes it used to load all the queries in the dashboard, but now only some are loading, the other 27 keep loading indefinitely.

Only seeing this error:
[f9d760dd-12a8-47b6-b3e7-64a9fae6aa2c] 2021-02-23T06:59:40-08:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: null
{:database_id 2,
:started_at #t “2021-02-23T09:59:39.989045-05:00[US/Eastern]”,
:state “42703”,
:json_query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true},
:database 2,
:query
{:source-query
{:source-query {:source-table 355, :filter [:and [:= [:field-id 3232] true] [:= [:field-id 3759] true]], :breakout [[:field-id 3235]]},
:joins [{:fields :all, :source-table 6, :condition [:= [:field-literal “location_id” :type/Integer] [:joined-field “Locations Location” [:field-id 2583]]], :alias “Locations Location”}],
:aggregation [[:count]],
:breakout [[:joined-field “Locations Location” [:field-id 2593]]]},
:joins [{:fields :all, :source-table 133, :condition [:= [:field-literal “account_id” :type/Integer] [:joined-field “Account” [:field-id 1565]]], :alias “Account”}],
:filter [:= [:joined-field “Account” [:field-id 1519]] true],
:aggregation [[:count]]},
:parameters [],
:async? true,
:cache-ttl nil},
:native
{:query
“SELECT count() AS “count” FROM (SELECT “Locations Location”.“account_id” AS “Locations Location__account_id”, count() AS “count” FROM (SELECT “public”.“online_ordering_onlineorderinglocation”.“location_id” AS “location_id” FROM “public”.“online_ordering_onlineorderinglocation” WHERE (“public”.“online_ordering_onlineorderinglocation”.“accepting_orders” = TRUE AND “public”.“online_ordering_onlineorderinglocation”.“display_covid_fee” = TRUE) GROUP BY “public”.“online_ordering_onlineorderinglocation”.“location_id” ORDER BY “public”.“online_ordering_onlineorderinglocation”.“location_id” ASC) “source” LEFT JOIN “public”.“locations_location” “Locations Location” ON “source”.“location_id” = “Locations Location”.“id” GROUP BY “Locations Location”.“account_id” ORDER BY “Locations Location”.“account_id” ASC) “source” LEFT JOIN “public”.“accounts_account” “Account” ON “source”.“account_id” = “Account”.“id” WHERE “Account”.“in_production” = TRUE”,
:params nil},
:status :failed,
:class org.postgresql.util.PSQLException,
:stacktrace
[“org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)”
“org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)”
“org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)”
“org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)”
“org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)”
“org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)”
“org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)”
“com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)”
“–> driver.sql_jdbc.execute$fn__77454.invokeStatic(execute.clj:264)”
“driver.sql_jdbc.execute$fn__77454.invoke(execute.clj:262)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:389)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:374)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:383)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:374)”
“driver.sql_jdbc$fn__78967.invokeStatic(sql_jdbc.clj:54)”
“driver.sql_jdbc$fn__78967.invoke(sql_jdbc.clj:52)”
“query_processor.context$executef.invokeStatic(context.clj:59)”
“query_processor.context$executef.invoke(context.clj:48)”
“query_processor.context.default$default_runf.invokeStatic(default.clj:68)”
“query_processor.context.default$default_runf.invoke(default.clj:66)”
“query_processor.context$runf.invokeStatic(context.clj:45)”
“query_processor.context$runf.invoke(context.clj:39)”
“query_processor.reducible$pivot.invokeStatic(reducible.clj:34)”
“query_processor.reducible$pivot.invoke(reducible.clj:31)”
“query_processor.middleware.mbql_to_native$mbql__GT_native$fn__46313.invoke(mbql_to_native.clj:25)”
“query_processor.middleware.check_features$check_features$fn__45589.invoke(check_features.clj:41)”
“query_processor.middleware.limit$limit$fn__46299.invoke(limit.clj:37)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__45240.invoke(cache.clj:211)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__46478.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__44386.invoke(auto_parse_filter_values.clj:43)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__40767.invoke(wrap_value_literals.clj:147)”
“query_processor.middleware.annotate$add_column_info$fn__40630.invoke(annotate.clj:582)”
“query_processor.middleware.permissions$check_query_permissions$fn__45464.invoke(permissions.clj:69)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__47001.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__45662.invoke(cumulative_aggregations.clj:60)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__47314.invoke(resolve_joined_fields.clj:94)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__47619.invoke(resolve_joins.clj:178)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__43976.invoke(add_implicit_joins.clj:181)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__46274.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__46254.invoke(format_rows.clj:74)”
“query_processor.middleware.desugar$desugar$fn__45728.invoke(desugar.clj:21)”
“query_processor.middleware.binning$update_binning_strategy$fn__44746.invoke(binning.clj:228)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__45264.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__43606.invoke(add_dimension_projections.clj:316)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__43837.invoke(add_implicit_clauses.clj:146)”
“query_processor.middleware.upgrade_field_literals$upgrade_field_literals$fn__48049.invoke(upgrade_field_literals.clj:45)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__44133.invoke(add_source_metadata.clj:124)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__47198.invoke(reconcile_breakout_and_order_by_bucketing.clj:97)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__44333.invoke(auto_bucket_datetimes.clj:139)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__45311.invoke(resolve_source_table.clj:45)”
“query_processor.middleware.parameters$substitute_parameters$fn__46983.invoke(parameters.clj:111)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__45363.invoke(resolve_referenced.clj:79)”
“query_processor.middleware.expand_macros$expand_macros$fn__45984.invoke(expand_macros.clj:155)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__44142.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__47985.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__47209$fn__47213.invoke(resolve_database_and_driver.clj:31)”
“driver$do_with_driver.invokeStatic(driver.clj:60)”
“driver$do_with_driver.invoke(driver.clj:56)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__47209.invoke(resolve_database_and_driver.clj:25)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__46202.invoke(fetch_source_query.clj:264)”
“query_processor.middleware.store$initialize_store$fn__47994$fn__47995.invoke(store.clj:11)”
“query_processor.store$do_with_store.invokeStatic(store.clj:44)”
“query_processor.store$do_with_store.invoke(store.clj:38)”
“query_processor.middleware.store$initialize_store$fn__47994.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__48056.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__46326.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__43994.invoke(add_rows_truncated.clj:35)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__47970.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__45605.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__47072.invoke(process_userland_query.clj:135)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__45548.invoke(catch_exceptions.clj:173)”
“query_processor.reducible$async_qp$qp_STAR___37408$thunk__37409.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___37408$fn__37411.invoke(reducible.clj:108)”],
:context :question,
:error “ERROR: column source.account_id does not exist\n Position: 989”,
:row_count 0,
:running_time 0,
:preprocessed
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true},
:info
{:executed-by 34,
:context :question,
:card-id 401,
:query-hash [-83, 88, 18, 26, -116, -123, 44, 102, -55, 60, -73, -116, -44, 95, 124, -106, 14, -83, -22, -35, -118, -88, -108, -9, -66, -77, -11, 88, 27, 125, 57, -34]},
:database 2,
:query
{:filter [:= [:joined-field “Account” [:field-id 1519]] [:value true {:base_type :type/Boolean, :special_type nil, :database_type “bool”, :name “in_production”}]],
:aggregation [[:aggregation-options [:count] {:name “count”}]],
:source-metadata
[{:table_id 355,
:special_type nil,
:name “location_id”,
:settings nil,
:field_ref [:field-id 3235],
:parent_id nil,
:id 3235,
:display_name “Location ID”,
:fingerprint {:global {:distinct-count 17, :nil% 0.0}},
:base_type :type/Integer}],
:joins [{:strategy :left-join, :source-table 133, :condition [:= [:field-literal “account_id” :type/Integer] [:joined-field “Account” [:field-id 1565]]], :alias “Account”}],
:source-query
{:aggregation [[:aggregation-options [:count] {:name “count”}]],
:breakout [[:joined-field “Locations Location” [:field-id 2593]]],
:source-metadata
[{:table_id 355,
:special_type nil,
:name “location_id”,
:settings nil,
:field_ref [:field-id 3235],
:parent_id nil,
:id 3235,
:display_name “Location ID”,
:fingerprint {:global {:distinct-count 17, :nil% 0.0}},
:base_type :type/Integer}],
:order-by [[:asc [:joined-field “Locations Location” [:field-id 2593]]]],
:joins [{:strategy :left-join, :source-table 6, :condition [:= [:field-id 3235] [:joined-field “Locations Location” [:field-id 2583]]], :alias “Locations Location”}],
:source-query
{:source-table 355,
:filter
[:and
[:= [:field-id 3232] [:value true {:base_type :type/Boolean, :special_type nil, :database_type “bool”, :name “accepting_orders”}]]
[:= [:field-id 3759] [:value true {:base_type :type/Boolean, :special_type nil, :database_type “bool”, :name “display_covid_fee”}]]],
:breakout [[:field-id 3235]],
:order-by [[:asc [:field-id 3235]]]}}},
:async? true},
:data {:rows [], :cols []}}

@Hanna Okay, based on that error, you’re seeing this issue:
https://github.com/metabase/metabase/issues/14872 - upvote by clicking :+1: on the first post

Can you explain that issue to me? That seems to affect one question/query, but my issue is that almost the entire dashboard is not loading, even though opening up each query in a separate tab shows there are no issues.

@Hanna

  1. Can you please include the entire log of the dashboard - not the stacktrace, just all the other request.
  2. Can you post the entire browser console, when loading the dashboard?
  3. Does this only happen on this dashboard, or any dashboard - even a dashboard with just a couple of questions?
  1. Dashboard log
  2. Console
  3. As far as I know, this is only happening on this dashboard. Even other dashboards with a similar amount of queries are loading fine.

@Hanna I’m not quite sure what is happening, but I’m guessing that there might be an inconsistency in the application database for that dashboard. I would need to see all the records from the table report_dashboardcard relating to this dashboard (id=48).
But it looks like one of the generated dashboards from X-rays, so if you try to generate a new dashboard via X-rays, does that work?

How do I view the table report_dashboardcard?

I’m not sure if this dashboard was created via x-rays but I recreated the dashboard from scratch and it’s not having any issues. I just want to know the reason it stopped loading in the first place, so that we prevent it from happening to another dashboard in the future.

@Hanna You would need access to the application database where Metabase stores all it’s information, which is a Postgres 10.13 in your case.