Dashboard publication doesn't refresh a few cards at times

Hello,

Could someone please advise why could a Dashboard email publication be not refreshing a few cards on Metabase?

This dashboard in question has 6 cards which is meant to refresh for daily cadence, and publish an email every morning with data until the last day. But, it misses to refresh 2/6 cards on the email time.

Things I have tried/validated:

  1. The cards refresh fine if I hit the refresh button on the card manually before the email publication schedule.
  2. I delayed the publication time just to take care of any DB refresh conflict, but was of no avail. The cards refreshed fine even at the older schedule.
  3. Using the clock icon on dashboard to refresh at a set schedule, but my requirement is not of displaying the dashboard on a score board and hence the view is not static, but required on email.

Please advise if there is anything that could possibly be causing this.

Thanks,
Ish Gupta

cc: @flamber

are you using caching with a long long TTL?

Hey, my TTL is 300 right now. Should that cause any issues?

PS: if possible, could you also redirect me to any resource which helps me understand how TTL impacts performance, please?

@ishgupta

Post "Diagnostic Info" from Admin > Troubleshooting.

You can read about caching here: https://www.metabase.com/docs/latest/administration-guide/14-caching.html

Please find it below:

{
"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.15+10",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.15",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.15+10",
"os.name": "Linux",
"os.version": "4.14.232-177.418.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"postgres",
"redshift",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.4"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.3.2"
}
},
"run-mode": "prod",
"version": {
"date": "2022-06-27",
"tag": "v0.43.4",
"branch": "release-x.43.x",
"hash": "61cc28e"
},
"settings": {
"report-timezone": null
}
}
}

@ishgupta If your questions takes 60 seconds to run and you set the TTL to 300, then the cache will be valid for 5 hours.

The auto-refresh on the dashboard will not refresh the cache (unless the cache has expired). It's a frontend feature, so it's your browser that does the refreshing, not Metabase.

If you have old cache entries, which might be causing problems, then clear those by truncating the application database table query_cache.
And check the log (Admin > Troubleshooting > Logs), which will tell you how long the question duration and TTL is:
INFO query-processor.card :: Question's average execution duration is 5.0 s; using 'magic' TTL of 15.0 minutes

1 Like