Metabase Admin Database Schema - AWS Athena - 504 Gateway Time-out

When I try get the AWS Athena schema (admin path: prod_url/admin/datamodel/database/2/schema/) returns:

<html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> </body> </html> 

This is only happening to Athena.

Comments:

  1. I can use athena to create queries using Metabase
  2. This error does not occur when accessing the schema of other databases

Support info:

{
  "browser-info": {
    "language": "pt-BR",
    "platform": "Linux x86_64",
    "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0",
    "vendor": ""
  },
  "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": "4.14.311-233.529.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "mysql",
      "h2",
      "athena"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "12.17"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.5.4"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2023-09-18",
      "tag": "v0.47.2",
      "branch": "release-x.47.x",
      "hash": "536c24c"
    },
    "settings": {
      "report-timezone": "Brazil/East"
    }
  }
}

Can you upgrade to 49.17? ... Do you have a proxy? Could be the header is too large or it's taking more time to load the schema so the request gets killed?

Hi Tony, thanks for the reply

  • I don't have a proxy
  • The header can be large, Athena is connected with big databases; In this case, do you have any suggestion?

I will try the upgrade (49.17 version) too

you have a reverse proxy (either a load balancer or pure reverse proxy), which is killing the request due to the metadata being too large (e.g. too many fields).

can you check if that's the case?

Also, can you open the browser development tools on the network tab to show us which api call is the one that's returning the 504?