New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queries failing after 60s despite changing dataproxy.timeout to > 60s(changed from 30/default but 180 is not reflecting) for Influx datasource #29457
Comments
any updates here ? |
I have the same problem. |
there is an issue with |
@som-kanade @mdicss i tried this in both grafana 7.5.7 and in current is it possible that some network equipment between the influxdb database and grafana-server is dropping the connection after 60 seconds? if not, could you please provide more detailed info? :
thanks. |
Hey @gabor thanks |
Fixed by #34597 |
hi @som-kanade thanks for the info. please try this out with grafana8 beta 3 or later (when it is released, it is not released yet). there were changes to the timeout handling that could fix the problem. if it does not we can reopen the issue. also, moving to a newer influxdb version is worth a try, the "1.x" series is at 1.8.6 currently. another approach is to, for a test-case, move both grafana and influxdb to the same EC2 box and try it again, something between the boxes might cut the connection after 60seconds. |
Hello @gabor and all. This issue is still there. Also read_timeout is set: Now if I set the datasource (HTTP) timeout configuration to any number greater than 60sec it will still use 60sec max. The error might be in the use of influxdb datasource code. Is this the repo https://github.com/grafana/influxdb-flux-datasource? Looking at file https://github.com/grafana/influxdb-flux-datasource/blob/master/pkg/models/settings.go This function LoadSettings is called from function newDataSourceInstance in file pkg/influx/datasource.go newDataSourceInstance function returns a grafana-plugin-sdk-go/backend/instancemgmt What I don't understand is why it works when I use a timeout value lower than 60. Maybe the problem is saving the options from Grafana to the influxdb2 datasource? I see this issue from 2020 that might be related: influxdata/influxdb-client-go#94 |
@rodolk flux support has been part of Grafana since v7 or something. Make sure you're using the builtin Influx datasource rather than any external plugin. The code in question for the builtin flux support is here grafana/pkg/tsdb/influxdb/flux/flux.go Lines 77 to 82 in f1fb202
|
@marefr OK, I assume I'm using the builtin influx datasource. How do I check this?
|
No, doesn't look like it. It's weird influx client provide a separate API for this and not reusing the existing http.Client Timeout field - then it would have just worked as expected. Maybe a newer version of the influx client handles this better? |
@marefr it's strange, this is an old issue, but originally i did test it and larger-than-60-second timeouts worked fine. it was not possible to reproduce the problem. anyway, if the timeout-value is not propagated, then this is something we should look at (i'm still confused why it worked in the past). i'll reopen the issue, but i don't work in this area anymore, so pinging @grafana/observability-metrics 👍 |
I face the same problem. I have connected Grafana to an InfluxDB data source. I have extended the config
Yet if I run large queries in Grafana (which I expect to take several minutes) I get the timeout error below.
It seems the client i.e. Grafana runs into a timeout. But my config changes have no effect. Grafana version: 10.2.2 |
What happened:
Long running queries from Influx Datasource failed to fetch for larger data within 60s but dataproxy.timeout is changed to 180s (which is not reflecting)
What you expected to happen:
We expect that queries should not appear to time out in less time than has been configured in the dataproxy.timeout setting.
Environment:
The text was updated successfully, but these errors were encountered: