Query timeout issue with Metabase and PostgreSQL - AsyncContext timeout

I'm currently executing a query that takes more than 10 minutes to complete. The query is being executed on a PostgreSQL database. When I make an API REST request to retrieve the data in CSV format, I receive the following message:

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 AsyncContext timeout</title>
<body><h2>HTTP ERROR 500 AsyncContext timeout</h2>
<tr><th>MESSAGE:</th><td>AsyncContext timeout</td></tr>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.14</a><hr/>


Now, I would like to know how I can increase the timeout for this query or if there are any alternative solutions available.

Metabase info :

  "browser-info": {
    "language": "fr-FR",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "Cp1252",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "",
    "os.name": "Windows Server 2016",
    "os.version": "10.0",
    "user.language": "fr",
    "user.timezone": "Europe/Paris"
  "metabase-info": {
    "databases": [
    "hosting-env": "unknown",
    "application-database": "mysql",
    "application-database-details": {
      "database": {
        "name": "MySQL",
        "version": "5.7.36"
      "jdbc-driver": {
        "name": "MariaDB Connector/J",
        "version": "2.7.6"
    "run-mode": "prod",
    "version": {
      "date": "2023-06-29",
      "tag": "v0.46.6",
      "branch": "release-x.46.x",
      "hash": "1bb88f5"
    "settings": {
      "report-timezone": null

my first recommendation: use Java 11

second one: increase your reverse proxy timeout to more than 10 min

Do you have a link to the correct java version ?