Error processing query

Hello I’ve setup the connections with remote MariaDB databases but sometimes the questions are freezing and.

The Metabase installation:

{
“browser-info”: {
“language”: “en-GB”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 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-Ubuntu-0ubuntu1.20.04”,
“java.vendor”: “Ubuntu”,
“java.vendor.url”: “https://ubuntu.com/”,
“java.version”: “11.0.10”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.10+9-Ubuntu-0ubuntu1.20.04”,
“os.name”: “Linux”,
“os.version”: “5.4.0-1039-azure”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
},
“metabase-info”: {
“databases”: [
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“application-database-details”: {
“database”: {
“name”: “MySQL”,
“version”: “5.6.47.0”
},
“jdbc-driver”: {
“name”: “MariaDB Connector/J”,
“version”: “2.6.2”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2021-01-26”,
“tag”: “v0.37.8”,
“branch”: “release-x.37.x”,
“hash”: “490cea7”
},
“settings”: {
“report-timezone”: null
}
}
}

I’m finding exceptions in the logs:

2021-02-10T12:41:03+01:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: null
{:database_id 13,
:started_at #t “2021-02-09T19:31:48.018695Z[Etc/UTC]”,
:json_query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true},
:database 13,
:query
{:source-table 950,
:filter [:and [:= [:field-id 7807] false] [:not-null [:field-id 7810]]],
:aggregation [[:count]],
:breakout [[:datetime-field [:fk-> [:field-id 7810] [:field-id 7790]] :month]]},
:parameters [],
:async? true,
:cache-ttl nil},
:native
{:query
“SELECT str_to_date(concat(date_format(orders__via__order_id.created_at, ‘%Y-%m’), ‘-01’), ‘%Y-%m-%d’) AS created_at, count(*) AS count FROM vouchers LEFT JOIN orders orders__via__order_id ON vouchers.order_id = orders__via__order_id.id WHERE (vouchers.valid = FALSE AND vouchers.order_id IS NOT NULL) GROUP BY str_to_date(concat(date_format(orders__via__order_id.created_at, ‘%Y-%m’), ‘-01’), ‘%Y-%m-%d’) ORDER BY str_to_date(concat(date_format(orders__via__order_id.created_at, ‘%Y-%m’), ‘-01’), ‘%Y-%m-%d’) ASC”,
:params nil},
:status :failed,
:class org.eclipse.jetty.io.EofException,
:stacktrace
[“org.eclipse.jetty.server.HttpConnection$SendCallback.reset(HttpConnection.java:724)”
“org.eclipse.jetty.server.HttpConnection$SendCallback.access$300(HttpConnection.java:683)”
“org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:542)”
“org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:833)”
“org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:910)”
“org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:284)”
“org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:268)”
“org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:713)”
“java.base/java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:282)”
“–> async.streaming_response$delay_output_stream$fn__24659.invoke(streaming_response.clj:120)”
“async.streaming_response.proxy$java.io.OutputStream$ff19274a.flush(Unknown Source)”
“query_processor.streaming.json$fn$reify__52076.finish_BANG_(json.clj:83)”
“query_processor.streaming$streaming_reducedf$fn__52549.invoke(streaming.clj:40)”
“query_processor.context$reducedf.invokeStatic(context.clj:77)”
“query_processor.context$reducedf.invoke(context.clj:72)”
“query_processor.context.default$default_reducef.invokeStatic(default.clj:66)”
“query_processor.context.default$default_reducef.invoke(default.clj:50)”
“query_processor.context$reducef.invokeStatic(context.clj:69)”
“query_processor.context$reducef.invoke(context.clj:62)”
“query_processor.context.default$default_runf$respond_STAR___36409.invoke(default.clj:71)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:394)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:385)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc$fn__78155.invokeStatic(sql_jdbc.clj:49)”
“driver.sql_jdbc$fn__78155.invoke(sql_jdbc.clj:47)”
“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:70)”
“query_processor.context.default$default_runf.invoke(default.clj:68)”
“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__44130.invoke(mbql_to_native.clj:26)”
“query_processor.middleware.check_features$check_features$fn__43406.invoke(check_features.clj:42)”
“query_processor.middleware.limit$limit$fn__44116.invoke(limit.clj:38)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__43057.invoke(cache.clj:214)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__44295.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__42204.invoke(auto_parse_filter_values.clj:44)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__45861.invoke(wrap_value_literals.clj:149)”
“query_processor.middleware.annotate$add_column_info$fn__41959.invoke(annotate.clj:575)”
“query_processor.middleware.permissions$check_query_permissions$fn__43281.invoke(permissions.clj:71)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__44813.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__43479.invoke(cumulative_aggregations.clj:61)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__45050.invoke(resolve_joined_fields.clj:36)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__45369.invoke(resolve_joins.clj:183)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__37684.invoke(add_implicit_joins.clj:254)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__44091.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__44071.invoke(format_rows.clj:75)”
“query_processor.middleware.desugar$desugar$fn__43545.invoke(desugar.clj:22)”
“query_processor.middleware.binning$update_binning_strategy$fn__42563.invoke(binning.clj:229)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__43081.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__37228.invoke(add_dimension_projections.clj:318)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__37435.invoke(add_implicit_clauses.clj:141)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37833.invoke(add_source_metadata.clj:105)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__45010.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__42151.invoke(auto_bucket_datetimes.clj:140)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43128.invoke(resolve_source_table.clj:46)”
“query_processor.middleware.parameters$substitute_parameters$fn__44795.invoke(parameters.clj:114)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__43180.invoke(resolve_referenced.clj:80)”
“query_processor.middleware.expand_macros$expand_macros$fn__43801.invoke(expand_macros.clj:158)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__37864.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__45731.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021$fn__45025.invoke(resolve_database_and_driver.clj:33)”
“driver$do_with_driver.invokeStatic(driver.clj:61)”
“driver$do_with_driver.invoke(driver.clj:57)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021.invoke(resolve_database_and_driver.clj:27)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__44019.invoke(fetch_source_query.clj:267)”
“query_processor.middleware.store$initialize_store$fn__45740$fn__45741.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__45740.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__45749.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__44143.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__37702.invoke(add_rows_truncated.clj:36)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__45716.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__43422.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__44884.invoke(process_userland_query.clj:136)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__43365.invoke(catch_exceptions.clj:174)”
“query_processor.reducible$async_qp$qp_STAR___36491$thunk__36492.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___36491$fn__36494.invoke(reducible.clj:108)”],
:context :question,
:error nil,
: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 1,
:context :question,
:card-id 20,
:query-hash [-58, 61, -68, -115, -39, -55, -35, 95, -1, -92, 86, 52, 90, 110, -122, 45, 2, 15, 66, -27, -46, 78, -119, -87, 95, 3, 98, 71, 49, 2, 66, 26]},
:database 13,
:query
{:source-table 950,
:filter
[:and
[:= [:field-id 7807] [:value false {:base_type :type/Boolean, :special_type :type/State, :database_type “BIT”, :name “valid”}]]
[:!= [:field-id 7810] [:value nil {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “order_id”}]]],
:aggregation [[:aggregation-options [:count] {:name “count”}]],
:breakout [[:datetime-field [:joined-field “orders__via__order_id” [:field-id 7790]] :month]],
:order-by [[:asc [:datetime-field [:joined-field “orders__via__order_id” [:field-id 7790]] :month]]],
:joins [{:strategy :left-join, :source-table 946, :alias “orders__via__order_id”, :fk-field-id 7810, :condition [:= [:field-id 7810] [:joined-field “orders__via__order_id” [:field-id 7775]]]}]},
:async? true},
:data {:rows [], :cols []}}

Second Exception:

ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: null
{:database_id 11,
:started_at #t “2021-02-10T11:13:04.219250Z[Etc/UTC]”,
:state “70100”,
:json_query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true},
:database 11,
:query
{:source-table 922,
:aggregation [[:count] [:sum [:field-id 7498]]],
:breakout [[:datetime-field [:field-id 7532] :day]],
:filter [:time-interval [:field-id 7532] -30 :day {:include-current true}]},
:parameters [],
:async? true,
:cache-ttl 4334717},
:native
{:query
“SELECT date(order_item.shop_order_created_at) AS shop_order_created_at, count(*) AS count, sum(order_item.shop_order_item_sales_price_net) AS sum FROM order_item WHERE date(order_item.shop_order_created_at) BETWEEN date(date_add(now(6), INTERVAL -30 day)) AND date(now(6)) GROUP BY date(order_item.shop_order_created_at) ORDER BY date(order_item.shop_order_created_at) ASC”,
:params nil},
:status :failed,
:class java.sql.SQLTimeoutException,
:stacktrace
[“org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:47)”
“org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:153)”
“org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:274)”
“org.mariadb.jdbc.ClientSidePreparedStatement.executeInternal(ClientSidePreparedStatement.java:229)”
“org.mariadb.jdbc.ClientSidePreparedStatement.execute(ClientSidePreparedStatement.java:149)”
“org.mariadb.jdbc.ClientSidePreparedStatement.executeQuery(ClientSidePreparedStatement.java:163)”
“com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)”
“–> driver.sql_jdbc.execute$fn__76650.invokeStatic(execute.clj:266)”
“driver.sql_jdbc.execute$fn__76650.invoke(execute.clj:264)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:391)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:385)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc$fn__78155.invokeStatic(sql_jdbc.clj:49)”
“driver.sql_jdbc$fn__78155.invoke(sql_jdbc.clj:47)”
“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:70)”
“query_processor.context.default$default_runf.invoke(default.clj:68)”
“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__44130.invoke(mbql_to_native.clj:26)”
“query_processor.middleware.check_features$check_features$fn__43406.invoke(check_features.clj:42)”
“query_processor.middleware.limit$limit$fn__44116.invoke(limit.clj:38)”
“query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:187)”
“query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__43057.invoke(cache.clj:213)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__44295.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__42204.invoke(auto_parse_filter_values.clj:44)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__45861.invoke(wrap_value_literals.clj:149)”
“query_processor.middleware.annotate$add_column_info$fn__41959.invoke(annotate.clj:575)”
“query_processor.middleware.permissions$check_query_permissions$fn__43281.invoke(permissions.clj:71)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__44813.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__43479.invoke(cumulative_aggregations.clj:61)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__45050.invoke(resolve_joined_fields.clj:36)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__45369.invoke(resolve_joins.clj:183)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__37684.invoke(add_implicit_joins.clj:254)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__44091.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__44071.invoke(format_rows.clj:75)”
“query_processor.middleware.desugar$desugar$fn__43545.invoke(desugar.clj:22)”
“query_processor.middleware.binning$update_binning_strategy$fn__42563.invoke(binning.clj:229)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__43081.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__37228.invoke(add_dimension_projections.clj:318)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__37435.invoke(add_implicit_clauses.clj:141)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37833.invoke(add_source_metadata.clj:105)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__45010.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__42151.invoke(auto_bucket_datetimes.clj:140)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43128.invoke(resolve_source_table.clj:46)”
“query_processor.middleware.parameters$substitute_parameters$fn__44795.invoke(parameters.clj:114)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__43180.invoke(resolve_referenced.clj:80)”
“query_processor.middleware.expand_macros$expand_macros$fn__43801.invoke(expand_macros.clj:158)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__37864.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__45731.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021$fn__45025.invoke(resolve_database_and_driver.clj:33)”
“driver$do_with_driver.invokeStatic(driver.clj:61)”
“driver$do_with_driver.invoke(driver.clj:57)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021.invoke(resolve_database_and_driver.clj:27)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__44019.invoke(fetch_source_query.clj:267)”
“query_processor.middleware.store$initialize_store$fn__45740$fn__45741.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__45740.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__45749.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__44143.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__37702.invoke(add_rows_truncated.clj:36)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__45716.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__43422.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__44884.invoke(process_userland_query.clj:136)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__43365.invoke(catch_exceptions.clj:174)”
“query_processor.reducible$async_qp$qp_STAR___36491$thunk__36492.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___36491$fn__36494.invoke(reducible.clj:108)”],
:context :question,
:error “(conn=799) Query execution was interrupted”,
: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 1,
:context :question,
:card-id 37,
:query-hash [-52, -66, 100, -104, 40, -32, -34, 52, 97, -22, -46, 111, -120, -17, 105, 60, -99, -70, 87, 102, 50, 117, 85, -120, 7, -80, -105, 114, 127, 51, 23, -105]},
:database 11,
:query
{:source-table 922,
:aggregation [[:aggregation-options [:count] {:name “count”}] [:aggregation-options [:sum [:field-id 7498]] {:name “sum”}]],
:breakout [[:datetime-field [:field-id 7532] :day]],
:filter [:between [:datetime-field [:field-id 7532] :day] [:relative-datetime -30 :day] [:relative-datetime 0 :day]],
:order-by [[:asc [:datetime-field [:field-id 7532] :day]]]},
:async? true,
:cache-ttl 4334717},
:data {:rows [], :cols []}}

Could you help me to debug such issues?

Thanks

Hi @elio_e
Metabase does not officially support MySQL 5.6 as a data source. And does not support MySQL 5.6 as the application database, the minimum version is 5.7.7:
https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#adding-a-database-connection
https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html#mysql-or-mariadb

I’m unsure if that could be the cause of your problems. You can try creating a similar question with the Sample Dataset and see if that works. You can enable Sample Dataset in Admin > Databases > link in the bottom.

Thanks for the reply. I actually use MariaDB 10.3 Provided by Microsoft Azure for the application database so not sure why is showing MySQL 5.6, should it show MariaDB 10.3, any idea why?

In the environment file there is this value for MB_DB_TYPE, I guess is correct :

MB_DB_TYPE=mysql

Good tip about the data source database version currently we are on Maria DB 10.0, I’ll see if we can do an update.

Thanks

@elio_e I cannot see the version of your data sources, just which driver it uses - it registers as mysql, but is actually mariadb underneath.
But the application database should be correct, so I guess that’s Azure who is “cheating” and sending a different identification string. All other setups I’ve seen that uses MariaDB actually shows that in the application-database-details.

Thanks again then I’ll check if updating the datasource will solve.
I’ve also noticed that in the query_cache table the results have totally strange characters, I understood they get encrypted but is it normal that look like this?
öÃ]Á:sÆ&`º4½E;Øn¸k-ÇÌ+µûÉz<

@elio_e It’s binary - humans cannot read that :wink:

Today I got again an issue with a saved question, it kept loading for 15 minutes and then returned this error in the log. Now if I load again the question loads instantly and returns 200 rows so doesn’t seem a load issue.

{:database_id 7,
:started_at #t “2021-02-11T09:50:53.599210Z[Etc/UTC]”,
:via
[{:status :failed,
:class clojure.lang.ExceptionInfo,
:error “Error reducing result rows”,
:stacktrace
["–> query_processor.context.default$default_reducef$fn__36405.invoke(default.clj:62)"
“query_processor.context.default$default_reducef.invokeStatic(default.clj:59)”
“query_processor.context.default$default_reducef.invoke(default.clj:50)”
“query_processor.context$reducef.invokeStatic(context.clj:69)”
“query_processor.context$reducef.invoke(context.clj:62)”
“query_processor.context.default$default_runf$respond_STAR___36409.invoke(default.clj:71)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:394)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:385)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc$fn__78155.invokeStatic(sql_jdbc.clj:49)”
“driver.sql_jdbc$fn__78155.invoke(sql_jdbc.clj:47)”
“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:70)”
“query_processor.context.default$default_runf.invoke(default.clj:68)”
“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__44130.invoke(mbql_to_native.clj:26)”
“query_processor.middleware.check_features$check_features$fn__43406.invoke(check_features.clj:42)”
“query_processor.middleware.limit$limit$fn__44116.invoke(limit.clj:38)”
“query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:187)”
“query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__43057.invoke(cache.clj:213)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__44295.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__42204.invoke(auto_parse_filter_values.clj:44)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__45861.invoke(wrap_value_literals.clj:149)”
“query_processor.middleware.annotate$add_column_info$fn__41959.invoke(annotate.clj:575)”
“query_processor.middleware.permissions$check_query_permissions$fn__43281.invoke(permissions.clj:71)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__44813.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__43479.invoke(cumulative_aggregations.clj:61)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__45050.invoke(resolve_joined_fields.clj:36)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__45369.invoke(resolve_joins.clj:183)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__37684.invoke(add_implicit_joins.clj:254)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__44091.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__44071.invoke(format_rows.clj:75)”
“query_processor.middleware.desugar$desugar$fn__43545.invoke(desugar.clj:22)”
“query_processor.middleware.binning$update_binning_strategy$fn__42563.invoke(binning.clj:229)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__43081.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__37228.invoke(add_dimension_projections.clj:318)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__37435.invoke(add_implicit_clauses.clj:141)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37833.invoke(add_source_metadata.clj:105)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__45010.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__42151.invoke(auto_bucket_datetimes.clj:140)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43128.invoke(resolve_source_table.clj:46)”
“query_processor.middleware.parameters$substitute_parameters$fn__44795.invoke(parameters.clj:114)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__43180.invoke(resolve_referenced.clj:80)”
“query_processor.middleware.expand_macros$expand_macros$fn__43801.invoke(expand_macros.clj:158)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__37864.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__45731.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021$fn__45025.invoke(resolve_database_and_driver.clj:33)”
“driver$do_with_driver.invokeStatic(driver.clj:61)”
“driver$do_with_driver.invoke(driver.clj:57)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021.invoke(resolve_database_and_driver.clj:27)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__44019.invoke(fetch_source_query.clj:267)”
“query_processor.middleware.store$initialize_store$fn__45740$fn__45741.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__45740.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__45749.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__44143.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__37702.invoke(add_rows_truncated.clj:36)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__45716.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__43422.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__44884.invoke(process_userland_query.clj:136)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__43365.invoke(catch_exceptions.clj:174)”
“query_processor.reducible$async_qp$qp_STAR___36491$thunk__36492.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___36491$fn__36494.invoke(reducible.clj:108)”],
:error_type :qp,
:ex-data {:type :qp}}],
:error_type :qp,
:json_query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true},
:database 7,
:query
{:source-table 814,
:joins
[{:fields :none, :source-table 803, :condition [:= [:field-id 6907] [:joined-field “Supplier Sub Service” [:field-id 6896]]], :alias “Supplier Sub Service”, :strategy :right-join}
{:fields [[:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]]],
:source-table 845,
:condition [:= [:field-id 6907] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6870]]],
:alias “Supplier Service - Supplier Sub Service”,
:strategy :left-join}],
:filter [:and [:= [:fk-> [:field-id 6905] [:field-id 6789]] “1”] [:= [:field-id 6912] 1 2 3 4]],
:aggregation [[:avg [:field-id 6906]]],
:breakout [[:field-id 6912] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]] [:field-id 6911]],
:order-by [[:asc [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]]]]},
:parameters [],
:async? true,
:cache-ttl 312155},
:native
{:query
“SELECT receptacle__via__receptacle_id.volume_size_value AS volume_size_value, supplier_sub_service_purchase_price_offer.receptacle_id AS receptacle_id, Supplier Service - Supplier Sub Service.service_name AS service_name, supplier_sub_service_purchase_price_offer.transport_fee_included AS transport_fee_included, avg(supplier_sub_service_purchase_price_offer.recycling_price_without_tax) AS avg FROM supplier_sub_service_purchase_price_offer LEFT JOIN supplier_service Supplier Service - Supplier Sub Service ON supplier_sub_service_purchase_price_offer.supplier_sub_service_id = Supplier Service - Supplier Sub Service.id LEFT JOIN supplier supplier__via__supplier_id ON supplier_sub_service_purchase_price_offer.supplier_id = supplier__via__supplier_id.id LEFT JOIN receptacle receptacle__via__receptacle_id ON supplier_sub_service_purchase_price_offer.receptacle_id = receptacle__via__receptacle_id.id RIGHT JOIN supplier_sub_service Supplier Sub Service ON supplier_sub_service_purchase_price_offer.supplier_sub_service_id = Supplier Sub Service.id WHERE (supplier__via__supplier_id.is_active = ? AND (supplier_sub_service_purchase_price_offer.receptacle_id = 1 OR supplier_sub_service_purchase_price_offer.receptacle_id = 2 OR supplier_sub_service_purchase_price_offer.receptacle_id = 3 OR supplier_sub_service_purchase_price_offer.receptacle_id = 4)) GROUP BY receptacle__via__receptacle_id.volume_size_value, supplier_sub_service_purchase_price_offer.receptacle_id, Supplier Service - Supplier Sub Service.service_name, supplier_sub_service_purchase_price_offer.transport_fee_included ORDER BY Supplier Service - Supplier Sub Service.service_name ASC, receptacle__via__receptacle_id.volume_size_value ASC, supplier_sub_service_purchase_price_offer.transport_fee_included ASC”,
:params (“1”)},
:status :failed,
:class org.eclipse.jetty.http.BadMessageException,
:stacktrace
[“org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:391)”
“org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:738)”
“org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)”
“org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)”
“org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:544)”
“org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:833)”
“org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:910)”
“org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:284)”
“org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:268)”
“org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:713)”
“java.base/java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:282)”
“–> async.streaming_response$delay_output_stream$fn__24659.invoke(streaming_response.clj:120)”
“async.streaming_response.proxy$java.io.OutputStream$ff19274a.flush(Unknown Source)”
“query_processor.streaming.json$fn$reify__52076.write_row_BANG_(json.clj:63)”
“query_processor.streaming$streaming_rff$fn__52544$fn__52545.invoke(streaming.clj:35)”
“query_processor.middleware.process_userland_query$add_and_save_execution_info_xform_BANG_$execution_info_rf_STAR___44875.invoke(process_userland_query.clj:95)”
“query_processor.reducible$combine_additional_reducing_fns$fn__36514.invoke(reducible.clj:216)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated_xform$fn__37697.invoke(add_rows_truncated.clj:28)”
“query_processor.middleware.format_rows$format_rows_xform$fn__44064.invoke(format_rows.clj:69)”
“query_processor.middleware.cache$save_results_xform$fn__43015.invoke(cache.clj:117)”
“query_processor.middleware.limit$limit_xform$fn__44113.invoke(limit.clj:25)”
“query_processor.reducible$reducible_rows$reify__36507.reduce(reducible.clj:161)”
“query_processor.context.default$default_reducef$fn__36405.invoke(default.clj:60)”
“query_processor.context.default$default_reducef.invokeStatic(default.clj:59)”
“query_processor.context.default$default_reducef.invoke(default.clj:50)”
“query_processor.context$reducef.invokeStatic(context.clj:69)”
“query_processor.context$reducef.invoke(context.clj:62)”
“query_processor.context.default$default_runf$respond_STAR___36409.invoke(default.clj:71)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:394)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:385)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc$fn__78155.invokeStatic(sql_jdbc.clj:49)”
“driver.sql_jdbc$fn__78155.invoke(sql_jdbc.clj:47)”
“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:70)”
“query_processor.context.default$default_runf.invoke(default.clj:68)”
“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__44130.invoke(mbql_to_native.clj:26)”
“query_processor.middleware.check_features$check_features$fn__43406.invoke(check_features.clj:42)”
“query_processor.middleware.limit$limit$fn__44116.invoke(limit.clj:38)”
“query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:187)”
“query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__43057.invoke(cache.clj:213)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__44295.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__42204.invoke(auto_parse_filter_values.clj:44)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__45861.invoke(wrap_value_literals.clj:149)”
“query_processor.middleware.annotate$add_column_info$fn__41959.invoke(annotate.clj:575)”
“query_processor.middleware.permissions$check_query_permissions$fn__43281.invoke(permissions.clj:71)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__44813.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__43479.invoke(cumulative_aggregations.clj:61)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__45050.invoke(resolve_joined_fields.clj:36)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__45369.invoke(resolve_joins.clj:183)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__37684.invoke(add_implicit_joins.clj:254)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__44091.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__44071.invoke(format_rows.clj:75)”
“query_processor.middleware.desugar$desugar$fn__43545.invoke(desugar.clj:22)”
“query_processor.middleware.binning$update_binning_strategy$fn__42563.invoke(binning.clj:229)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__43081.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__37228.invoke(add_dimension_projections.clj:318)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__37435.invoke(add_implicit_clauses.clj:141)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37833.invoke(add_source_metadata.clj:105)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__45010.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__42151.invoke(auto_bucket_datetimes.clj:140)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43128.invoke(resolve_source_table.clj:46)”
“query_processor.middleware.parameters$substitute_parameters$fn__44795.invoke(parameters.clj:114)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__43180.invoke(resolve_referenced.clj:80)”
“query_processor.middleware.expand_macros$expand_macros$fn__43801.invoke(expand_macros.clj:158)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__37864.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__45731.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021$fn__45025.invoke(resolve_database_and_driver.clj:33)”
“driver$do_with_driver.invokeStatic(driver.clj:61)”
“driver$do_with_driver.invoke(driver.clj:57)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021.invoke(resolve_database_and_driver.clj:27)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__44019.invoke(fetch_source_query.clj:267)”
“query_processor.middleware.store$initialize_store$fn__45740$fn__45741.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__45740.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__45749.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__44143.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__37702.invoke(add_rows_truncated.clj:36)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__45716.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__43422.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__44884.invoke(process_userland_query.clj:136)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__43365.invoke(catch_exceptions.clj:174)”
“query_processor.reducible$async_qp$qp_STAR___36491$thunk__36492.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___36491$fn__36494.invoke(reducible.clj:108)”],
:context :question,
:error “500: No version”,
: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 1,
:context :question,
:card-id 29,
:query-hash [94, -115, -38, 114, -98, -121, 68, -14, -128, -4, 44, -87, -109, 21, 98, 46, 124, 5, 74, 108, 121, 21, 119, 125, 62, -80, -66, 106, -9, 79, 59, -70]},
:database 7,
:query
{:source-table 814,
:joins
[{:strategy :right-join, :source-table 803, :condition [:= [:field-id 6907] [:joined-field “Supplier Sub Service” [:field-id 6896]]], :alias “Supplier Sub Service”}
{:strategy :left-join,
:source-table 845,
:condition [:= [:field-id 6907] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6870]]],
:alias “Supplier Service - Supplier Sub Service”}
{:strategy :left-join, :source-table 840, :alias “supplier__via__supplier_id”, :fk-field-id 6905, :condition [:= [:field-id 6905] [:joined-field “supplier__via__supplier_id” [:field-id 6781]]]}
{:strategy :left-join,
:source-table 797,
:alias “receptacle__via__receptacle_id”,
:fk-field-id 6912,
:condition [:= [:field-id 6912] [:joined-field “receptacle__via__receptacle_id” [:field-id 6736]]]}],
:filter
[:and
[:= [:joined-field “supplier__via__supplier_id” [:field-id 6789]] [:value “1” {:base_type :type/Text, :special_type :type/State, :database_type “CHAR”, :name “is_active”}]]
[:or
[:= [:field-id 6912] [:value 1 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]
[:= [:field-id 6912] [:value 2 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]
[:= [:field-id 6912] [:value 3 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]
[:= [:field-id 6912] [:value 4 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]]],
:aggregation [[:aggregation-options [:avg [:field-id 6906]] {:name “avg”}]],
:breakout [[:joined-field “receptacle__via__receptacle_id” [:field-id 6741]] [:field-id 6912] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]] [:field-id 6911]],
:order-by [[:asc [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]]] [:asc [:joined-field “receptacle__via__receptacle_id” [:field-id 6741]]] [:asc [:field-id 6911]]]},
:async? true,
:cache-ttl 312155},
:data {:rows [], :cols []}}

@elio_e I don’t know what’s wrong. I have not seen such behavior before. But since you’re using cache, then it might be returning results from that the second time you run it?

One of the errors with 500: No version, which I have never seen before - don’t know where that comes from; meaning if it is your database returning that error.

If you can provide a sample schema and steps to reproduce, then it would be much easier to figuring out what the problem is.

Logs from your database might help figuring out what is being queried, how long it takes, the returned results and any possible errors.

Thanks for replying @flamber.

The cache way I would exclude, I don’t see records from today in metabase db.

I wonder if timeouts on the MariaDB database settings are a factor reason.

wait_timeout and interactive_timout are set to 360 seconds

what I see in the source database logs

210211 11:12:31 [Warning] Aborted connection 193718 to db: 'db-24' user: 'metabase' host: 'XXX' (Got timeout reading communication packets)
210211 11:12:32 [Warning] Aborted connection 193717 to db: 'db-24' user: 'metabase' host: 'XXX' (Got timeout reading communication packets)
....

Maybe the SSL layer on top of the port? :exploding_head:
I’m using direct connection to the DB port + SSL.
The current setting is: SSL to YES and Additional JDBC connection string options:trustServerCertificate=true

Can I send you the schema in private somehow?

Many thanks in advance

We enabled the performance_schema in MySQL. This way, we may be able to pinpoint the problematic queries.

@elio_e It’s a little difficult to understand what the problem is - too many things are going on - simplify and take one issue at the time.

I cannot see if your question are cancelled after 6 minutes, since you didn’t include that part from the log.

I cannot setup a database similar to your config based on a screenshot. You would need to do the debugging.
You can modify the timeouts in the connection string.
But I know that having short timeouts can cause strange problems:
https://github.com/metabase/metabase/issues/9885

If you are having problems with a specific schema (i.e. a column type causing problems), then you should post a sample schema. From the errors you’re now posting, it seems like you have a connection issue.

Yeah sorry if gets confusing, it wasn’t meat to be.

The issue is this: randomly at least one specific question is hanging for about 15 minutes and then shows “Your Question Took Too long”, other times the actual data shows up. You already helped a lot pinpointing the fact we use an old MariaDB version so we can keep this issue frozen till we upgrade the version.

I posted multiple logs in case was evident some common cause. What I would exclude is CPU or Memory issue. Maybe is not a bug report but just asking for investigating what’s going on.

I don’t want to publicly send the schema, this would take time to be approved, that’s why I asked if I can somehow send privately or via some support channel. The screenshot was just about the db configuration about timeouts.

I’m going to try the change of timeouts in the connection string. That’s a great tip, I didn’t know this was possible.

I keep you posted if that helps.

Have a nice day

[84a85075-9258-4ad5-a0ef-c704e76b2fd0] 2021-02-11T14:42:15+01:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: null
{:database_id 7,
:started_at #t “2021-02-11T13:26:35.380881Z[Etc/UTC]”,
:via
[{:status :failed,
:class clojure.lang.ExceptionInfo,
:error “Error reducing result rows”,
:stacktrace
["–> query_processor.context.default$default_reducef$fn__36405.invoke(default.clj:62)"
“query_processor.context.default$default_reducef.invokeStatic(default.clj:59)”
“query_processor.context.default$default_reducef.invoke(default.clj:50)”
“query_processor.context$reducef.invokeStatic(context.clj:69)”
“query_processor.context$reducef.invoke(context.clj:62)”
“query_processor.context.default$default_runf$respond_STAR___36409.invoke(default.clj:71)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:394)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:385)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc$fn__78155.invokeStatic(sql_jdbc.clj:49)”
“driver.sql_jdbc$fn__78155.invoke(sql_jdbc.clj:47)”
“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:70)”
“query_processor.context.default$default_runf.invoke(default.clj:68)”
“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__44130.invoke(mbql_to_native.clj:26)”
“query_processor.middleware.check_features$check_features$fn__43406.invoke(check_features.clj:42)”
“query_processor.middleware.limit$limit$fn__44116.invoke(limit.clj:38)”
“query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:187)”
“query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__43057.invoke(cache.clj:213)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__44295.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__42204.invoke(auto_parse_filter_values.clj:44)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__45861.invoke(wrap_value_literals.clj:149)”
“query_processor.middleware.annotate$add_column_info$fn__41959.invoke(annotate.clj:575)”
“query_processor.middleware.permissions$check_query_permissions$fn__43281.invoke(permissions.clj:71)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__44813.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__43479.invoke(cumulative_aggregations.clj:61)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__45050.invoke(resolve_joined_fields.clj:36)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__45369.invoke(resolve_joins.clj:183)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__37684.invoke(add_implicit_joins.clj:254)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__44091.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__44071.invoke(format_rows.clj:75)”
“query_processor.middleware.desugar$desugar$fn__43545.invoke(desugar.clj:22)”
“query_processor.middleware.binning$update_binning_strategy$fn__42563.invoke(binning.clj:229)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__43081.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__37228.invoke(add_dimension_projections.clj:318)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__37435.invoke(add_implicit_clauses.clj:141)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37833.invoke(add_source_metadata.clj:105)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__45010.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__42151.invoke(auto_bucket_datetimes.clj:140)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43128.invoke(resolve_source_table.clj:46)”
“query_processor.middleware.parameters$substitute_parameters$fn__44795.invoke(parameters.clj:114)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__43180.invoke(resolve_referenced.clj:80)”
“query_processor.middleware.expand_macros$expand_macros$fn__43801.invoke(expand_macros.clj:158)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__37864.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__45731.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021$fn__45025.invoke(resolve_database_and_driver.clj:33)”
“driver$do_with_driver.invokeStatic(driver.clj:61)”
“driver$do_with_driver.invoke(driver.clj:57)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021.invoke(resolve_database_and_driver.clj:27)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__44019.invoke(fetch_source_query.clj:267)”
“query_processor.middleware.store$initialize_store$fn__45740$fn__45741.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__45740.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__45749.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__44143.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__37702.invoke(add_rows_truncated.clj:36)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__45716.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__43422.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__44884.invoke(process_userland_query.clj:136)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__43365.invoke(catch_exceptions.clj:174)”
“query_processor.reducible$async_qp$qp_STAR___36491$thunk__36492.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___36491$fn__36494.invoke(reducible.clj:108)”],
:error_type :qp,
:ex-data {:type :qp}}],
:error_type :qp,
:json_query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true},
:database 7,
:query
{:source-table 814,
:joins
[{:fields :none, :source-table 803, :condition [:= [:field-id 6907] [:joined-field “Supplier Sub Service” [:field-id 6896]]], :alias “Supplier Sub Service”, :strategy :right-join}
{:fields [[:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]]],
:source-table 845,
:condition [:= [:field-id 6907] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6870]]],
:alias “Supplier Service - Supplier Sub Service”,
:strategy :left-join}],
:filter [:and [:= [:fk-> [:field-id 6905] [:field-id 6789]] “1”] [:= [:field-id 6912] 1 2 3 4]],
:aggregation [[:avg [:field-id 6906]]],
:breakout [[:field-id 6912] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]] [:field-id 6911]],
:order-by [[:asc [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]]]]},
:parameters [],
:async? true,
:cache-ttl 584988},
:native
{:query
“SELECT receptacle__via__receptacle_id.volume_size_value AS volume_size_value, supplier_sub_service_purchase_price_offer.receptacle_id AS receptacle_id, Supplier Service - Supplier Sub Service.service_name AS service_name, supplier_sub_service_purchase_price_offer.transport_fee_included AS transport_fee_included, avg(supplier_sub_service_purchase_price_offer.recycling_price_without_tax) AS avg FROM supplier_sub_service_purchase_price_offer LEFT JOIN supplier_service Supplier Service - Supplier Sub Service ON supplier_sub_service_purchase_price_offer.supplier_sub_service_id = Supplier Service - Supplier Sub Service.id LEFT JOIN supplier supplier__via__supplier_id ON supplier_sub_service_purchase_price_offer.supplier_id = supplier__via__supplier_id.id LEFT JOIN receptacle receptacle__via__receptacle_id ON supplier_sub_service_purchase_price_offer.receptacle_id = receptacle__via__receptacle_id.id RIGHT JOIN supplier_sub_service Supplier Sub Service ON supplier_sub_service_purchase_price_offer.supplier_sub_service_id = Supplier Sub Service.id WHERE (supplier__via__supplier_id.is_active = ? AND (supplier_sub_service_purchase_price_offer.receptacle_id = 1 OR supplier_sub_service_purchase_price_offer.receptacle_id = 2 OR supplier_sub_service_purchase_price_offer.receptacle_id = 3 OR supplier_sub_service_purchase_price_offer.receptacle_id = 4)) GROUP BY receptacle__via__receptacle_id.volume_size_value, supplier_sub_service_purchase_price_offer.receptacle_id, Supplier Service - Supplier Sub Service.service_name, supplier_sub_service_purchase_price_offer.transport_fee_included ORDER BY Supplier Service - Supplier Sub Service.service_name ASC, receptacle__via__receptacle_id.volume_size_value ASC, supplier_sub_service_purchase_price_offer.transport_fee_included ASC”,
:params (“1”)},
:status :failed,
:class org.eclipse.jetty.http.BadMessageException,
:stacktrace
[“org.eclipse.jetty.http.HttpGenerator.generateResponse(HttpGenerator.java:391)”
“org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:738)”
“org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)”
“org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)”
“org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:544)”
“org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:833)”
“org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:910)”
“org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:284)”
“org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:268)”
“org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:713)”
“java.base/java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:282)”
“–> async.streaming_response$delay_output_stream$fn__24659.invoke(streaming_response.clj:120)”
“async.streaming_response.proxy$java.io.OutputStream$ff19274a.flush(Unknown Source)”
“query_processor.streaming.json$fn$reify__52076.write_row_BANG_(json.clj:63)”
“query_processor.streaming$streaming_rff$fn__52544$fn__52545.invoke(streaming.clj:35)”
“query_processor.middleware.process_userland_query$add_and_save_execution_info_xform_BANG_$execution_info_rf_STAR___44875.invoke(process_userland_query.clj:95)”
“query_processor.reducible$combine_additional_reducing_fns$fn__36514.invoke(reducible.clj:216)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated_xform$fn__37697.invoke(add_rows_truncated.clj:28)”
“query_processor.middleware.format_rows$format_rows_xform$fn__44064.invoke(format_rows.clj:69)”
“query_processor.middleware.cache$save_results_xform$fn__43015.invoke(cache.clj:117)”
“query_processor.middleware.limit$limit_xform$fn__44113.invoke(limit.clj:25)”
“query_processor.reducible$reducible_rows$reify__36507.reduce(reducible.clj:161)”
“query_processor.context.default$default_reducef$fn__36405.invoke(default.clj:60)”
“query_processor.context.default$default_reducef.invokeStatic(default.clj:59)”
“query_processor.context.default$default_reducef.invoke(default.clj:50)”
“query_processor.context$reducef.invokeStatic(context.clj:69)”
“query_processor.context$reducef.invoke(context.clj:62)”
“query_processor.context.default$default_runf$respond_STAR___36409.invoke(default.clj:71)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:394)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:385)”
“driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:376)”
“driver.sql_jdbc$fn__78155.invokeStatic(sql_jdbc.clj:49)”
“driver.sql_jdbc$fn__78155.invoke(sql_jdbc.clj:47)”
“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:70)”
“query_processor.context.default$default_runf.invoke(default.clj:68)”
“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__44130.invoke(mbql_to_native.clj:26)”
“query_processor.middleware.check_features$check_features$fn__43406.invoke(check_features.clj:42)”
“query_processor.middleware.limit$limit$fn__44116.invoke(limit.clj:38)”
“query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:187)”
“query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__43057.invoke(cache.clj:213)”
“query_processor.middleware.optimize_datetime_filters$optimize_datetime_filters$fn__44295.invoke(optimize_datetime_filters.clj:133)”
“query_processor.middleware.auto_parse_filter_values$auto_parse_filter_values$fn__42204.invoke(auto_parse_filter_values.clj:44)”
“query_processor.middleware.wrap_value_literals$wrap_value_literals$fn__45861.invoke(wrap_value_literals.clj:149)”
“query_processor.middleware.annotate$add_column_info$fn__41959.invoke(annotate.clj:575)”
“query_processor.middleware.permissions$check_query_permissions$fn__43281.invoke(permissions.clj:71)”
“query_processor.middleware.pre_alias_aggregations$pre_alias_aggregations$fn__44813.invoke(pre_alias_aggregations.clj:40)”
“query_processor.middleware.cumulative_aggregations$handle_cumulative_aggregations$fn__43479.invoke(cumulative_aggregations.clj:61)”
“query_processor.middleware.resolve_joined_fields$resolve_joined_fields$fn__45050.invoke(resolve_joined_fields.clj:36)”
“query_processor.middleware.resolve_joins$resolve_joins$fn__45369.invoke(resolve_joins.clj:183)”
“query_processor.middleware.add_implicit_joins$add_implicit_joins$fn__37684.invoke(add_implicit_joins.clj:254)”
“query_processor.middleware.large_int_id$convert_id_to_string$fn__44091.invoke(large_int_id.clj:44)”
“query_processor.middleware.format_rows$format_rows$fn__44071.invoke(format_rows.clj:75)”
“query_processor.middleware.desugar$desugar$fn__43545.invoke(desugar.clj:22)”
“query_processor.middleware.binning$update_binning_strategy$fn__42563.invoke(binning.clj:229)”
“query_processor.middleware.resolve_fields$resolve_fields$fn__43081.invoke(resolve_fields.clj:24)”
“query_processor.middleware.add_dimension_projections$add_remapping$fn__37228.invoke(add_dimension_projections.clj:318)”
“query_processor.middleware.add_implicit_clauses$add_implicit_clauses$fn__37435.invoke(add_implicit_clauses.clj:141)”
“query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37833.invoke(add_source_metadata.clj:105)”
“query_processor.middleware.reconcile_breakout_and_order_by_bucketing$reconcile_breakout_and_order_by_bucketing$fn__45010.invoke(reconcile_breakout_and_order_by_bucketing.clj:98)”
“query_processor.middleware.auto_bucket_datetimes$auto_bucket_datetimes$fn__42151.invoke(auto_bucket_datetimes.clj:140)”
“query_processor.middleware.resolve_source_table$resolve_source_tables$fn__43128.invoke(resolve_source_table.clj:46)”
“query_processor.middleware.parameters$substitute_parameters$fn__44795.invoke(parameters.clj:114)”
“query_processor.middleware.resolve_referenced$resolve_referenced_card_resources$fn__43180.invoke(resolve_referenced.clj:80)”
“query_processor.middleware.expand_macros$expand_macros$fn__43801.invoke(expand_macros.clj:158)”
“query_processor.middleware.add_timezone_info$add_timezone_info$fn__37864.invoke(add_timezone_info.clj:15)”
“query_processor.middleware.splice_params_in_response$splice_params_in_response$fn__45731.invoke(splice_params_in_response.clj:32)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021$fn__45025.invoke(resolve_database_and_driver.clj:33)”
“driver$do_with_driver.invokeStatic(driver.clj:61)”
“driver$do_with_driver.invoke(driver.clj:57)”
“query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__45021.invoke(resolve_database_and_driver.clj:27)”
“query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__44019.invoke(fetch_source_query.clj:267)”
“query_processor.middleware.store$initialize_store$fn__45740$fn__45741.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__45740.invoke(store.clj:10)”
“query_processor.middleware.validate$validate_query$fn__45749.invoke(validate.clj:10)”
“query_processor.middleware.normalize_query$normalize$fn__44143.invoke(normalize_query.clj:22)”
“query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__37702.invoke(add_rows_truncated.clj:36)”
“query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__45716.invoke(results_metadata.clj:147)”
“query_processor.middleware.constraints$add_default_userland_constraints$fn__43422.invoke(constraints.clj:42)”
“query_processor.middleware.process_userland_query$process_userland_query$fn__44884.invoke(process_userland_query.clj:136)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__43365.invoke(catch_exceptions.clj:174)”
“query_processor.reducible$async_qp$qp_STAR___36491$thunk__36492.invoke(reducible.clj:103)”
“query_processor.reducible$async_qp$qp_STAR___36491$fn__36494.invoke(reducible.clj:108)”],
:context :question,
:error “500: No version”,
: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 1,
:context :question,
:card-id 29,
:query-hash [94, -115, -38, 114, -98, -121, 68, -14, -128, -4, 44, -87, -109, 21, 98, 46, 124, 5, 74, 108, 121, 21, 119, 125, 62, -80, -66, 106, -9, 79, 59, -70]},
:database 7,
:query
{:source-table 814,
:joins
[{:strategy :right-join, :source-table 803, :condition [:= [:field-id 6907] [:joined-field “Supplier Sub Service” [:field-id 6896]]], :alias “Supplier Sub Service”}
{:strategy :left-join,
:source-table 845,
:condition [:= [:field-id 6907] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6870]]],
:alias “Supplier Service - Supplier Sub Service”}
{:strategy :left-join, :source-table 840, :alias “supplier__via__supplier_id”, :fk-field-id 6905, :condition [:= [:field-id 6905] [:joined-field “supplier__via__supplier_id” [:field-id 6781]]]}
{:strategy :left-join,
:source-table 797,
:alias “receptacle__via__receptacle_id”,
:fk-field-id 6912,
:condition [:= [:field-id 6912] [:joined-field “receptacle__via__receptacle_id” [:field-id 6736]]]}],
:filter
[:and
[:= [:joined-field “supplier__via__supplier_id” [:field-id 6789]] [:value “1” {:base_type :type/Text, :special_type :type/State, :database_type “CHAR”, :name “is_active”}]]
[:or
[:= [:field-id 6912] [:value 1 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]
[:= [:field-id 6912] [:value 2 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]
[:= [:field-id 6912] [:value 3 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]
[:= [:field-id 6912] [:value 4 {:base_type :type/Integer, :special_type :type/FK, :database_type “INT UNSIGNED”, :name “receptacle_id”}]]]],
:aggregation [[:aggregation-options [:avg [:field-id 6906]] {:name “avg”}]],
:breakout [[:joined-field “receptacle__via__receptacle_id” [:field-id 6741]] [:field-id 6912] [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]] [:field-id 6911]],
:order-by [[:asc [:joined-field “Supplier Service - Supplier Sub Service” [:field-id 6872]]] [:asc [:joined-field “receptacle__via__receptacle_id” [:field-id 6741]]] [:asc [:field-id 6911]]]},
:async? true,
:cache-ttl 584988},
:data {:rows [], :cols []}}

[84a85075-9258-4ad5-a0ef-c704e76b2fd0] 2021-02-11T14:42:15+01:00 DEBUG metabase.middleware.log POST /api/card/29/query 202 [ASYNC: completed] 15.7 mins (18 DB calls) App DB connections: 0/13 Jetty threads: 3/50 (4 idle, 0 queued) (138 total active threads) Queries in flight: 0 (0 queued)

One last thing, I just checked in the DBMS we haven’t seen any queries running longer than 0.2 ms

@elio_e Great. Let’s see what happens after you’re upgraded. There are plenty of reasons why we don’t want to support 5.6 - it also had really annoying connection handling.

But please read issue 9885 - it has a lot of details, which will likely help you.

Connection issues are some of the hardest to debug - I can only give you hints, since I cannot see what’s going on.

Interesting that all your queries as very fast, but then you still see something hanging. It would require a lot more debugging, but until you have upgraded, then I don’t think it’s worth trying to do right now.

1 Like

Yeah true totally understandable. I can use these reasons to push for the upgrade soon as till now we haven’t got concrete reasons so was postponed.

Regards

@elio_e Another good reason: https://en.wikipedia.org/wiki/MySQL#Release_history

1 Like