Lost metrics due to RequestTimedOutError

I have an instance of Influx 2.0 running on a docker container receiving data from a Node.js app also running on a separate docker container and writing to the Influx instance through the npm api for influx. After a about an hour of writing metrics to Influx I start receiving this message fairly frequently:

Is there any way to prevent this error from happening? I have tested the Node.js app outside of docker and the error does not seem to occur.

@sranka can you help here? I’m not sure if this is something that can be fixed or debugged with the JS client or not.

We are running into a similar error with the JS client. Our environment is a Node.js 12 Google Cloud function called from a mobile app, and we are using Influx 2 Cloud. This causes us to drop data so we are trying to determine what we’re doing to cause the request timeout.

This error is occurring more frequently as our number of requests increase, so I am not sure if it may be related to how our Influx cloud instance is configured, which is currently hosted on GCP.

@diglez @mhall119 do you have any recommendations for how to prevent these timeouts or where to look when troubleshooting these types of read or write timeouts with the Javascript client?

Below is our error log:

Unhandled error y [RequestTimedOutError]: Request timed out
    at ClientRequest.<anonymous> (/workspace/node_modules/@influxdata/influxdb-client/dist/index.js:16:9601)
    at ClientRequest.emit (events.js:314:20)
    at ClientRequest.EventEmitter.emit (domain.js:506:15)
    at TLSSocket.emitRequestTimeout (_http_client.js:715:9)
    at Object.onceWrapper (events.js:420:28)
    at TLSSocket.emit (events.js:326:22)
    at TLSSocket.EventEmitter.emit (domain.js:506:15)
    at TLSSocket.Socket._onTimeout (net.js:483:8)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7) 

I’m experiencing exactly the same issue. Any recommendations?

Hi all, thanks for reporting. assuming you are using the GitHub - influxdata/influxdb-client-js: InfluxDB 2.0 JavaScript client, could you open an issue in that repo with the code you are using and the error message you are seeing? we will have the team look into it.

Thanks,
Russ