"Failed to connect before the deadline" errors being seen
See original GitHub issueSince upgrading to the latest pubsub ("@google-cloud/pubsub": "1.1.5"
) my node is still getting occasional errors from the underlying grpc library. My app is using grpc-js@0.6.9:
$ npm ls | grep grpc-js │ │ ├─┬ @grpc/grpc-js@0.6.9
It’s not as bad as it was. When I first upgraded to pubsub 1.x it simply didn’t work at all, I’d get an error within a few seconds of the app starting and from then no messages would get delivered.
Now the problem is much less bad (my app is working), but I still see the following errors in my logs:
From subscription.on(
error, (err) => {
I see this:
{"code":4,"details":"Failed to connect before the deadline","metadata":{"internalRepr":{},"options":{}}}
And in my logs I’ve also noticed these (excuse the formatting):
Error: Failed to add metadata entry @���: Wed, 13 Nov 2019 07:13:16 GMT. Metadata key "@���" contains illegal characters at validate (/home/nodeapp/apps/crypto-trader-prototype/shared-code/node_modules/@grpc/grpc-js/build/src/metadata.js:35:15) at Metadata.add (/home/nodeapp/apps/crypto-trader-prototype/shared-code/node_modules/@grpc/grpc-js/build/src/metadata.js:87:9) at values.split.forEach.v (/home/nodeapp/apps/crypto-trader-prototype/shared-code/node_modules/@grpc/grpc-js/build/src/metadata.js:226:63) at Array.forEach (<anonymous>) at Object.keys.forEach.key (/home/nodeapp/apps/crypto-trader-prototype/shared-code/node_modules/@grpc/grpc-js/build/src/metadata.js:226:43) at Array.forEach (<anonymous>) at Function.fromHttp2Headers (/home/nodeapp/apps/crypto-trader-prototype/shared-code/node_modules/@grpc/grpc-js/build/src/metadata.js:200:30) at ClientHttp2Stream.stream.on (/home/nodeapp/apps/crypto-trader-prototype/shared-code/node_modules/@grpc/grpc-js/build/src/call-stream.js:211:56) at ClientHttp2Stream.emit (events.js:193:13) at emit (internal/http2/core.js:244:8) at processTicksAndRejections (internal/process/task_queues.js:81:17)
… but the two don’t seem to be related.
I will start running with the debug flags enabled and report back
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (9 by maintainers)
Top GitHub Comments
I may be speaking too soon, but it looks like the latest release may have fixed this issue.
Recent releases seem to have steadily reduced the number of errors, but until recently I was getting one or two errors per day. I’ve had zero for five days now. The upgrade in question took my deps from:
to …
[update] I’ve had zero errors since the 24th November.