Some dashboards slowly loading

Some dashboards are extremely slow to load, however used queries are not that complicated and tested on SQL engine with no issues.

Below is the diagnostics data

{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.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.20+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.20",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.20+8",
"os.name": "Linux",
"os.version": "5.15.0-79-generic",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"sqlserver",
"postgres",
"googleanalytics",
"h2"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "2.1.214 (2022-06-13)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "2.1.214 (2022-06-13)"
}
},
"run-mode": "prod",
"version": {
"date": "2023-08-16",
"tag": "v0.47.0",
"branch": "release-x.47.x",
"hash": "682ec2d"
},
"settings": {
"report-timezone": "Africa/Cairo"
}
}
}

Upgrade to 47.2 and also move away from h2

I did the mentioned steps, however I am still having the same issue. Some queries take up to 10 minutes to run on Metabase even though they take around 1~2 seconds to run on SQL Server.
Below is the diagnostics data

{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.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.20.1+1",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.20.1",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.20.1+1",
"os.name": "Linux",
"os.version": "5.15.0-79-generic",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"sqlserver",
"postgres"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "2.1.214 (2022-06-13)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "2.1.214 (2022-06-13)"
}
},
"run-mode": "prod",
"version": {
"date": "2023-09-18",
"tag": "v0.47.2",
"branch": "release-x.47.x",
"hash": "536c24c"
},
"settings": {
"report-timezone": "Africa/Cairo"
}
}
}

You’re still on H2. What’s the sizing of your Metabase server?

These are the databases that are connected right now. Also, please clarify what do you mean by server size? Is it disk space?

If you haven't already, reduce the number of reports on your dashboard to speed up the load time, and maybe enable caching

I have done this, reduced the reports to lower than 8 reports per dashboard and enabled caching. However, some dashboards take up to 10 ~ 15 minutes even though all the included queries take up to 5 to seconds each when executed on SQL query.

Maybe as recommended by Luiggi, migrate away from the H2 server as recommended by Metabase

Hope it helps.

Ok, I have 2 questions regarding this recommendation.

  1. How do I migrate from the H2 server
  2. Is this H2 server different from the sample (H2) database?

Are you sandboxing the tables you're querying?

Metabase has its own 'system' database that stores all the dashboard/question/setup etc information. When first installed, it uses H2. This is a file based database, prone to corruption and not scalable.
You need to migrate to MySQL or Postgres (my preference).
Best explaination is in the documentation as it depends upon your OS and how you've installed.

1 Like

This was very helpful, Thank you so much.