Pulse to email not rendering questions

I have multiple pulses that go to various email addresses every morning between 8am and 10am. Over the past two weeks a few of the cards in the pulses are failing to render. It different cards each time that don’t pull through and in some cases, none of the cards have loaded. This has resulted in me having to manually resend the pulse after which the cards in the pulses all load fine.

The error message I keep getting is An error occurred while displaying this card.

Any ideas as to why this may be happening?

Thanks

@camillak
Which version of Metabase?
Which database are you querying?
What does log say, when it was supposed to send the pulses. And when it displays the message?

@flamber

  • version v0.32.8
  • Bookings database
  • Log only records today so can’t view historical errors (the issue has not come up this week so far)
  • Error message when card does not render An error occurred while displaying this card.

@camillak
I’m asking which type of database you’re querying - Postgres, MS SQL, Redshift, BigQuery, …?
I’m asking about the error log of Metabase, which is very detailed. Depending on how you’re running Metabase (JAR-file, Docker, Mac App, …), the location can be multiple places.

Sorry @flamber very new to this.
Database is MySQL
Running it using Docker

The same errors popped up this morning with the email pulses
I have taken a look at the logs and this is what I have come across (of which there are multiple instances)
May 30 07:16:05 ERROR metabase.task.send-pulses :: Error sending Pulse 33
clojure.lang.ExceptionInfo: Input to defaulted-timezone does not match schema:

Appears there must be some sort of issue with the timezone as other errors exist within the log that state ERROR metabase.driver.sql-jdbc.execute :: Failed to set timezone:

@camillak
You’re cutting too much of the error messages, so you’re only showing parts of it.
But yes, it looks like you have a timezone issue, but that should be a problem for all pulses, so since it’s sometimes sending pulses and other times it’s not, then there should be other errors.

May 31 07:29:09 ERROR metabase.pulse.render :: Pulse card render error clojure.lang.ExceptionInfo Card has errors: (conn=1939528) Operation timed out (Write failed)
("–> pulse.render$fn__27131$render_pulse_card_body__27136$fn__27140.invoke(render.clj:778)"
“pulse.render$fn__27131$render_pulse_card_body__27136.invoke(render.clj:773)”
“pulse.render$fn__27164$render_pulse_card__27169$fn__27170.invoke(render.clj:800)”
“pulse.render$fn__27164$render_pulse_card__27169.invoke(render.clj:796)”
“pulse.render$render_pulse_card_for_display.invokeStatic(render.clj:816)”
“pulse.render$render_pulse_card_for_display.invoke(render.clj:812)”
“api.pulse$fn__58017$fn__58018.invoke(pulse.clj:165)”
“api.pulse$fn__58017.invokeStatic(pulse.clj:165)”
“api.pulse$fn__58017.invoke(pulse.clj:158)”
“middleware.auth$enforce_authentication$fn__59926.invoke(auth.clj:14)”
“routes$fn__61084$fn__61085.doInvoke(routes.clj:56)”
“middleware.exceptions$catch_uncaught_exceptions$fn__60017.invoke(exceptions.clj:104)”
“middleware.exceptions$catch_api_exceptions$fn__60014.invoke(exceptions.clj:92)”
“middleware.log$log_api_call$fn__61458$fn__61459.invoke(log.clj:170)”
“middleware.log$log_api_call$fn__61458.invoke(log.clj:164)”
“middleware.security$add_security_headers$fn__59980.invoke(security.clj:105)”
“middleware.json$wrap_json_body$fn__61163.invoke(json.clj:61)”
“middleware.json$wrap_streamed_json_response$fn__61181.invoke(json.clj:97)”
“middleware.session$bind_current_user$fn__58593$fn__58594.invoke(session.clj:193)”
“middleware.session$do_with_current_user.invokeStatic(session.clj:176)”
“middleware.session$do_with_current_user.invoke(session.clj:170)”
“middleware.session$bind_current_user$fn__58593.invoke(session.clj:192)”
“middleware.session$wrap_current_user_id$fn__58582.invoke(session.clj:161)”
“middleware.session$wrap_session_id$fn__58567.invoke(session.clj:123)”
“middleware.auth$wrap_api_key$fn__59934.invoke(auth.clj:27)”
“middleware.misc$maybe_set_site_url$fn__61523.invoke(misc.clj:58)”
“middleware.misc$bind_user_locale$fn__61526.invoke(misc.clj:74)”
“middleware.misc$add_content_type$fn__61511.invoke(misc.clj:30)”
“middleware.misc$disable_streaming_buffering$fn__61548.invoke(misc.clj:119)”
“middleware.misc$wrap_gzip$fn__61541.invoke(misc.clj:101)”)

Does this help to look at?

I’m not sure, but from the error Operation timed out (Write failed), seems to hint that the connection to the database failed for some reason.
Do you see anything in the log of your database, when the Pulse fails?
Do you see this error at other times, or do you sometimes lose database connection?

The snippet I shared above is what comes up when a question in a Pulse fails.
I had another failed card render in a pulse this morning but it has not come up in the log.

We send the pulses in the morning so the only times cards fail to render are between 8am and 10am.
It appears we do lost connection as a frequent error that comes up in the log is:

Jun 13 23:16:45 ERROR metabase.driver.sql-jdbc.execute :: Failed to set timezone:
SQLException:
Message: Connections could not be acquired from the underlying database!
SQLState: null

These are also common errors that come up in the log:

Error Code: 0
Jun 13 23:16:15 ERROR metabase.driver.sql-jdbc.execute :: Failed to set timezone:
SQLNonTransientConnectionException:
Message: (conn=2709536) Operation timed out (Read failed)
SQLState: 08
Error Code: 0

Jun 14 07:27:33 ERROR metabase.driver.sql-jdbc.execute :: Failed to set timezone:
SQLNonTransientConnectionException:
Message: (conn=1008124) Broken pipe (Write failed)
SQLState: 08
Error Code: 0

Jun 14 00:00:03 ERROR metabase.driver.sql-jdbc.execute :: Failed to set timezone:
SQLException:
Message: (conn=2727275) Unknown or incorrect time zone: ‘Europe/London’
SQLState: HY000
Error Code: 1298

@camillak

You need to check the log of MySQL. It looks like the connection is being dropped by the database. It could also be caused by network issues.

As for the timezone warning, that’s caused by your MySQL not having any timezone data names:
https://dba.stackexchange.com/questions/120945/how-do-i-resolve-this-error-error-1298-hy000-unknown-or-incorrect-time-zone

Thanks a mill for your help and sharing that link.

I will look into this further with our dev team.

All the best