Error: No connection established
Problem description
Since google-gax forced the grpc-js version to 0.6.4 (https://github.com/googleapis/gax-nodejs/commit/628db9e84c61017dfaba22ac7c2215e2c79c9745), I am having the following issue :
Error: No connection established
at Http2CallStream.call.on (/usr/src/node_modules/@google-cloud/bigtable/node_modules/@grpc/grpc-js/build/src/call.js:68:41)
at Http2CallStream.emit (events.js:203:15)
at Http2CallStream.EventEmitter.emit (domain.js:448:20)
at process.nextTick (/usr/src/node_modules/@google-cloud/bigtable/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22)
at process._tickCallback (internal/process/next_tick.js:61:11)
Reproduction steps
The bug only happens after one hour. We are using grpc-js inside @google-cloud/bigtable and our bigtable instance is autoscaling.
Thank you for the report! Just to confirm, does that mean that the script should have an hour of idle time with no network requests to experience that, or just an hour of runtime?
Similar issue on @google-cloud/[email protected] After about 10 minutes of idle time with no network requests, any call to "publish" callbacks after 10 minutes (maxRetryDelayMillis) to say "Retry total timeout exceeded before any response was received" To be able to find this error "No connection established", I had to add logs in the google-gax module
We are seeing the exact same issues as @harscoet with @google-cloud/[email protected]
It happens after an hour of runtime (I had this issue on our main API). Then it starts to throw those errors on separate processes progressively.

Same issue when using @google-cloud/datastore which depends on google-gax
We are looking into this and will either fix it ASAP, or release an update to google-gax that pins @grpc/grpc-js to an older version.
Just to make sure I understand, are you making some requests that succeed, then going idle for a while, then making more requests and seeing these errors?
Also, do you folks run your code on a physical machine, or in any kind of cloud e.g. cloud functions?
@murgatroid99 we are seeing that our services are running fine for 10ish minutes and then we start dropping connections. At this time we see deadline exceeded errors. Once this happens we are unable to have successful requests with both google-cloud/pubsub and google-cloud/datastore
@alexander-fenster we are seeing this using with services running within GKE containers
We downgraded @grpc/grpc-js to 0.5.4 and also other related google libraries to a version that don't depend on @grpc/[email protected]. The problem seems gone. It may related to #1062 & #1061
If my fix is right, this problem was actually in #1015 but it was overshadowed by other problems.
I have published version 0.6.5 of @grpc/grpc-js. You should pick it up if you update your dependencies. Please try that and see if it solves this problem.
@apatora @harscoet @reichjustin @weipublic Could you folks please check if the fix in v0.6.5 works for you all, and let us know? Thank you!
@alexander-fenster I tried v0.6.5 and I still have the issue. Lots of Error: No connection established after an hour of runtime.
Same here, with DataStore and PubSub, 0.6.5 doesn't fix the issue
Same issues for us when using @google-cloud/datastore which depends on google-gax
Can someone seeing this issue with grpc-js 0.6.5 run with the environment variables GRPC_TRACE=all and GRPC_VERBOSITY=DEBUG and share the log output? If you can't set environment variables the normal way you can set those on process.env before loading any libraries.
I would also like to understand how exactly this problem is manifesting. Are you seeing one or a few errors and then later calls succeed? Or do you see this error and then all subsequent calls fail with the same error? Or something else?
would be reasonable to suggest using pinned @grpc/grpc-js versions ? just to avoid a large impact when those sensitive dependencies run into issues.
We have seen those errors starting to occur around 1 hour after a fresh pod creation. After those started, all subsequent calls were starting to fail. Pintpointing lib to previous working version (0.5.2) resolved the issue. (using google Firestore)