Query Runs in 2–4s in Query Library but Takes 130–160s on Page (Despite 10s Timeout)

Hello guys,

I have a script named user_label that’s set with a 10-second timeout , yet it continues running for 130–160 seconds when triggered from the page or when run by itself. Surprisingly, it doesn’t always return results, even after that long. Clearly exceeding the configured limit!


What’s more confusing is that when we run the same script from the Query Library, it completes in just 2–4 seconds — consistently and without any problems.

This discrepancy between execution time in the Query Library and on the page is quite concerning. It suggests the issue isn’t with the query logic or the database, but possibly with how Retool handles query execution in the app interface.

This behavior isn’t isolated to user_label. Other scripts also fail to load when run from the page, taking up to 160 seconds, yet execute successfully in 3–9 seconds from the library.

Could anyone please help me identify what might be causing this inconsistency and why the timeout setting isn’t being enforced?

Much appreciated!

Hi @Charif,

Apologies for the issue, that is very odd. Our performance team will definitely want to see this so we can do some further testing to find the root cause of this and fix it!

Can you share a JSON export of the app with some steps on what queries to run to reproduce this?

Hi @Charif,

Just wanted to follow up on this post and see if you can share more details about the app/queries, or even the JSON export so I can test it. As well as if this issue is still happening to your org!