Setting statement_timeout for postgres connection in Metabase

Hello and thanks in advance for your help here.

I am trying to set the statement_timeout parameter in my postgres connection.

I have tried adding "statement_timeout=300" to the "Additional JDBC connection string options" in the Database section of the admin panel, but my queries keep timing out after 30 seconds.

Can someone please help me understand the correct way to specify statement_timeout in the additional JDBC connection string options?

Hi @ccardillo
statement_timeout is in milliseconds unless you specify the unit:
https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT

Are you sure that the timeout comes from Postgres query timeout? Check the full error in Metabase > Admin > Troubleshooting > Logs.
Sounds like you have a reverse-proxy, which closes the connection between the browser and Metabase:
https://www.metabase.com/docs/latest/troubleshooting-guide/proxies.html

Thank you. This solved my problem.