Metabase Middleware taking too much time to submit request on downstream databases

{
  "browser-info": {
    "language": "en-GB",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "1.8.0_232-8u232-b09-0ubuntu1~16.04.1-b09",
    "java.vendor": "Private Build",
    "java.vendor.url": "http://java.oracle.com/",
    "java.version": "1.8.0_232",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "25.232-b09",
    "os.name": "Linux",
    "os.version": "4.4.0-1100-aws",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  },
  "metabase-info": {
    "databases": [
      "mysql",
      "redshift",
      "postgres",
      "bigquery",
      "mongo",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "9.5.15"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
      }
    },
    "run-mode": "prod",
    "version": {
      "tag": "v0.34.1",
      "date": "2020-01-28",
      "branch": "test-redshift-jdbc-1.2.37",
      "hash": "ca34789"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

We have redshift database in metabase which is the main interaction point for all the users. We upgraded metabase from 0.30.4 to 0.34.1 though it reduced the load on redshift. It increased the query output response time for smaller queries. Also queries without parameters is not throwing error upfront, that is also queued somehow. We tried debugging the issue, it seems metabase middleware is not submitting the request itself. Is there any work around for this, how to increase overall response throughput?

Hi @nilesh.sinha
It seems like there might be issues with the current upstream Redshift driver, which is being investigated for possible upgrade. This has been a problem a couple of times the past year.
There’s also a lot of work being done to stream queries, which will fix Redshift locks (and possibly the latency you’re experiencing):
https://github.com/metabase/metabase/issues/11441
But could it be that you’re currently using 15 connections (which is the max)? So the latency comes from waiting for a connection to finish before it starts a new?
https://github.com/metabase/metabase/issues/2172#issuecomment-559638836
Might also want to read:
https://github.com/metabase/metabase/issues/8679