MongoDB Slowness

I've added a MongoDB as a data source to the latest version of metabase (0.41). Initially the database connection starts off well and looks good. However, soon after connecting, everything related to MongoDB slows down to a crawl. Trying to load the schema from within MongoDB results in a Gateway Timeout from Metabase. I haven't been able to find any issues on the MongoDB side.

is there any known issues with MongoDB as a source for metabase? Anything specifically to look at?


Hi @chrisrmno
Post "Diagnostic Info" from Admin > Troubleshooting.

When you add a data source, then Metabase has to sync that database - it takes time, and even more time on Mongo, because of how it works.

If you're getting "Gateway Timeout", then those are not coming from Metabase, but your reverse-proxy:

As for known Mongo issues. Yes, there's several:

  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "UTF-8",
    "": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.12+7",
    "java.vendor": "Eclipse Foundation",
    "java.vendor.url": "",
    "java.version": "11.0.12",
    "": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.12+7",
    "": "Linux",
    "os.version": "4.14.243-185.433.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  "metabase-info": {
    "databases": [
    "hosting-env": "unknown",
    "application-database": "mysql",
    "application-database-details": {
      "database": {
        "name": "MySQL",
        "version": "5.7.33-log"
      "jdbc-driver": {
        "name": "MariaDB Connector/J",
        "version": "2.6.2"
    "run-mode": "prod",
    "version": {
      "date": "2021-10-21",
      "tag": "v0.41.1",
      "branch": "release-x.41.x",
      "hash": "76aa4a5"
    "settings": {
      "report-timezone": "UTC"