SNOWFLAKE select query times out after 60 seconds

Similar to other posts in this forum I have a snowflake select query that can run for a couple of minutes. However in the console logs I see that the query fails with an error message similar to "...failed (60.058s)".
I added below environment variables to docker.env and then restarted the app.

DBCONNECTOR_QUERY_TIMEOUT_MS=360000
ROXY_CONNECT_TIMEOUT=360
PROXY_SEND_TIMEOUT=360
PROXY_READ_TIMEOUT=360
KEEPALIVE_TIMEOUT=360

I also checked snowflake and the user and warehouse STATEMENT_TIMEOUT_IN_SECONDS are set to 172800.

The retool resource query's timeout is greyed out and shows the number 10000. When I hover over the question mark next to the timing field a tooltip is shown saying "The option is greyed out for this resource type because we're unable to set timeout from the frontend. Please handle this timeout in the resource platform itself, or Retools global 120s timeout will apply."

What am I doing wrong, or what else could I be missing to increase the timeout from 60 seconds?

UPDATE: I bumped up the timeout on the AWS ALB from 60 to 360 and now the query fails after: ...failed (120.122s):Query timed out after 120000ms.

When I go to https://retool.{mydomain}/settings/environment the environment variables still shows unchanged: DBCONNECTOR_QUERY_TIMEOUT_MS="120000" even though I added them to the docker.env file and ran sudo ./local-trial

How do I change the environment variables such as DBCONNECTOR_QUERY_TIMEOUT_MS on a local EC2 instance?

Never mind, I was working on a defunct installation on the server and that's why the changes didn't take effect.

In the end, changing the AWS ALB timeouts and adding above environment vars to docker.env did the trick.

1 Like