Hello, I recently started to use a postgresql datasource in my Grafana dashboards. Unfortunately it seems to run into some timeout issue for more complex queries after approx. 1 minute (“request error” without further details).
Can you confirm that there is such a time limit and is there a way to extend it?
Best,
I thought the timeout was 30 seconds - if you look in your Chrome Dev Tools console, do you get a more detailed error there? (Or in the grafana server logs).
Long queries is very much an edge case for Grafana. Most timeseries queries should complete within in a second or two.
There is a feature request for adding a configuration option for query timeouts but it is not implemented: https://github.com/grafana/grafana/issues/3168
@gapvision
were you able to find a solution? I’m facing the same issue
Welcome @georgehazboun1997
Could you please share your query?
@yosiasz
I’m having the same issue. I can easily reproduce the timeout with the pg_sleep
command:
SELECT pg_sleep(40);
=> no timeout
SELECT pg_sleep(70);
=> timeout
So there seems to be a hard 1 minute timeout somewhere but I can’t find where to override it. I already tried the timeout variables in grafana.ini
Any ideas?
well, same question to you. we cant see your query remotely. Also try the same query that times out in grafana, in a pg query tool how long does it take?
I don’t see how sharing the query here will help. My issue is not with the query, I already know it takes a long time, more than a minute, whether through grafana or any other tool.
The timeout however only happens in grafana, hence my question (and I suppose other people’s in this thread as well): is there a way to configure this timeout limit?
1 Like
I have come up against the same issue and done some diagnostics that make this pretty clear. The timeout on my setup seems to be 30 seconds exactly. I did this using the pg_sleep(n) method where I tested n increasing over time and monitored the network console to see when the response came back. Any value of n >= 30 produced an error after 30 seconds.
So thats pretty clear. The question then is… how does one modify this setting?