Bigquery Connection Timeout

Hi,

I've recently been building an app that retrieves data from BigQuery and displays it in a variety of tables. My BigQuery table is set to be partitioned on day, and clustered by hour and minute.

If I run a query inside BigQuery such as
SELECT *
FROM table_name
WHERE Date(CreatedDate) = Date("desired_date") AND
Hour BETWEEN 8 and 8 AND
Minute BETWEEN 5 AND 10

The query takes around ~4 seconds, and processes 250mb of data.

However, when executing this query in my retool resource to retrieve the same data, the query runs for 30 seconds then (assumedly) times out. The query returns a 502 response in dev tools, waiting 30.1 seconds for a server response.

I've tried upping the default timeout on the resource to 120000 (120 seconds) to no avail, it still fails at exactly 30 seconds.

In BigQuery itself, under Project History, I can see the query succeeded and took approximately 2 seconds, so it appears the issue lies with the queried data making its way back from bigquery into retool.

Have I misunderstood how the timeout works with the BigQuery resource? Or am I misunderstanding the root cause of the query not returning correctly?

Any advice would be greatly appreciated.

Hi Patches!

This might be a better question to write to support with so we can take a look into the app. But first, are you on a self-hosted instance of Retool or on cloud?

Do you see any errors in the browser console at all?

This is a self hosted instance of retool.

The console just shows a 502 error response from bigquery after 30 seconds.

Hey @patches!

Are you able to pull any logs from your db-connector container that might contain a more verbose error message that we can take a look at.

Aside from that, consistent timeouts that don't seem to correlate with the timeout settings in Retool can sometimes have to do with the ingress you're using for your self-hosted instance (e.g. nginx). Have you checked the timeout settings there to see if anything is set to 30s?

Regardless, it's certainly odd that BigQuery is returning a result in 2s and that isn't getting passed to Retool :thinking: curious to see what the logs show and whether there's any clue there as to what might be happening.