Embed Dashboard Connection Issue

We started using metabase on Cloud for few weeks. When embedding dashboard, sometimes we see "There was a problem displaying this chart".

When checking the trouble shooting log, we found some connection exceptions. The strange thing is that it seems happen in embed mode most of the time. We tried adding tcpKeppAlive setting etc but it seems still happen periodically.

I have copied the stack trace here for reference.

Can anyone kindly assist us?

{
"browser-info": {
"language": "en-GB",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.14.1+1",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.14.1",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.14.1+1",
"os.name": "Linux",
"os.version": "5.4.196-108.356.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"postgres",
"bigquery-cloud-sdk"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "11.13"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.23"
}
},
"run-mode": "prod",
"version": {
"date": "2022-04-07",
"tag": "v1.42.4",
"branch": "release-x.42.x",
"hash": "7c3ce2d"
},
"settings": {
"report-timezone": "Etc/GMT"
}
}
}

[ab46318e-3f6a-4386-be3b-337dbd1fb8cf] 2022-07-23T14:12:30+08:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: null
{:database_id 10,
:started_at #t "2022-07-23T06:12:26.513812Z[GMT]",
:via
[{:status :failed,
:class org.postgresql.util.PSQLException,
:error "An I/O error occurred while sending to the backend.",
:stacktrace
["org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:349)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)"
"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:1471)"
"--> driver.sql_jdbc.execute$fn__42690.invokeStatic(execute.clj:364)"
"driver.sql_jdbc.execute$fn__42690.invoke(execute.clj:362)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invokeStatic(execute.clj:377)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invoke(execute.clj:373)"
"driver.sql_jdbc.execute$execute_reducible_query$fn__42772.invoke(execute.clj:502)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:501)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:487)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:496)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:487)"
"driver.sql_jdbc$fn__86851.invokeStatic(sql_jdbc.clj:54)"
"driver.sql_jdbc$fn__86851.invoke(sql_jdbc.clj:52)"
"query_processor.context$executef.invokeStatic(context.clj:59)"

{:query
"SELECT "public"."Order"."hour" AS "hour", count(*) AS "count", sum("public"."Order"."grandTotal") AS "sum" FROM "public"."Order" LEFT JOIN "public"."Group" "Group__via__groupId" ON "public"."Order"."groupId" = "Group__via__groupId"."id" WHERE ("Group__via__groupId"."name" = ? AND "public"."Order"."business" >= ? AND "public"."Order"."business" < ? AND "public"."Order"."tally" = TRUE) GROUP BY "public"."Order"."hour" ORDER BY "public"."Order"."hour" ASC",
:params ("Aigens" #t "2022-07-23T00:00Z[Etc/GMT]" #t "2022-07-24T00:00Z[Etc/GMT]")},
:status :failed,
:class java.io.EOFException,
:stacktrace
["org.postgresql.core.PGStream.receiveChar(PGStream.java:445)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2056)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:322)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)"
"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:1471)"
"--> driver.sql_jdbc.execute$fn__42690.invokeStatic(execute.clj:364)"
"driver.sql_jdbc.execute$fn__42690.invoke(execute.clj:362)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invokeStatic(execute.clj:377)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invoke(execute.clj:373)"
"driver.sql_jdbc.execute$execute_reducible_query$fn__42772.invoke(execute.clj:502)"

Hi @aigens
Try contacting support via email, so we can verify you and look at logs.
But I have a feeling that you might be seeing this issue, which somehow is causing your database to drop the connection that Metabase is actually wanting to use instead of the extra requests that are cancelled.
https://github.com/metabase/metabase/issues/17061