Closed mt-mrx closed 9 months ago
An ugly workaround, but which fixes my issue at least, is the following code change in the directory /opt/iobroker/iobroker-data/node-red/node_modules
of my iobroker installation.
However I think it needs to be reapplied every time iobroker/node-red is updated and the module is reinstalled
--- node-red-contrib-influxdb/influxdb.js.orig 2023-05-07 21:49:45.571852400 +0200
+++ node-red-contrib-influxdb/influxdb.js 2023-05-07 22:03:18.672948454 +0200
@@ -58,9 +58,11 @@ module.exports = function (RED) {
`${this.credentials.username}:${this.credentials.password}` :
this.credentials.token;
+ //2023-05-07: mt-mrx: Increase default query timeout from 10s to 60s
clientOptions = {
url: n.url,
rejectUnauthorized: n.rejectUnauthorized,
+ timeout: 60000,
token
}
this.client = new InfluxDB(clientOptions);
added a configuration property for 1.8 and 2.x versions in version 0.7.0
Thanks, just tested it, works fine!
I have a flux (read) query which needs on my influxdb 2.4 instance ~13 seconds to return the data. At least that's the time the query takes when running it via the influxdb 2.4 data explorer web GUI.
When running the query via the "influxdb in" node I get a timeout.
I believe there is currently no way to increase the connection/query timeout when using the "influxdb in" node. Is there any other way to increase the (I believe) default 10 seconds timeout?
It would be nice to be able to specify the timeout parameter like the "precision" via a message property and/or "influxdb in" node configuration field.
According to this https://influxdata.github.io/influxdb-client-js/influxdb-client.connectionoptions.html I believe there is a "timeout" parameter when creating the client connection.
thx
Matthias