Skip to content
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

Error: 13 INTERNAL: Received RST_STREAM with error code 2 #437

Closed
ThomWright opened this issue Jan 22, 2019 · 6 comments
Closed

Error: 13 INTERNAL: Received RST_STREAM with error code 2 #437

ThomWright opened this issue Jan 22, 2019 · 6 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@ThomWright
Copy link

After upgrading to 0.23.0 (from 0.21.1) I see my subscriber services connecting to pubsub, receiving a few messages, then some time later experiencing the following error:

Error: 13 INTERNAL: Received RST_STREAM with error code 2
    at Object.exports.createStatusError (/app/node_modules/google-gax/node_modules/grpc/src/common.js:91:15)
    at ClientDuplexStream._emitStatusIfDone (/app/node_modules/google-gax/node_modules/grpc/src/client.js:233:26)
    at ClientDuplexStream._receiveStatus (/app/node_modules/google-gax/node_modules/grpc/src/client.js:211:8)
    at Object.onReceiveStatus (/app/node_modules/google-gax/node_modules/grpc/src/client_interceptors.js:1306:15)
    at InterceptingListener._callNext (/app/node_modules/google-gax/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/app/node_modules/google-gax/node_modules/grpc/src/client_interceptors.js:618:8)
    at /app/node_modules/google-gax/node_modules/grpc/src/client_interceptors.js:1123:18

Here are some example logs and timestamps from service start until the error:

"Subscriptions ready" "2019-01-22T09:39:35.890Z"
"Handling message" "2019-01-22T09:39:42.701Z"
"Handling message" "2019-01-22T09:40:21.545Z"
"Handling message" "2019-01-22T09:40:22.276Z"
"Handling message" "2019-01-22T09:40:59.133Z"
"Handling message" "2019-01-22T09:52:01.244Z"
"Handling message" "2019-01-22T09:52:10.978Z"
"Handling message" "2019-01-22T09:52:11.854Z"
"Handling message" "2019-01-22T09:52:22.544Z"
"Handling message" "2019-01-22T10:03:55.492Z"
"Handling message" "2019-01-22T10:04:03.351Z"
"Handling message" "2019-01-22T10:05:45.136Z"
"Handling message" "2019-01-22T10:06:07.888Z"
"Handling message" "2019-01-22T10:06:17.679Z"
"Error emitted from subscription" "2019-01-22T10:09:42.682Z"

It seems to take about half an hour from a service starting to receiving the error, reasonably consistently I think.

See googleapis/google-cloud-node#2619 for a similar, previous error.

Environment details

  • OS: Alpine Linux
  • Node.js version: 10.15.0
  • npm version: 6.6
  • @google-cloud/pubsub version: 0.23.0

Steps to reproduce

  1. Use version 0.23.0
  2. Wait half an hour?

Sorry I don't have any better repro steps.

@callmehiphop callmehiphop self-assigned this Jan 22, 2019
@callmehiphop
Copy link
Contributor

@ThomWright thanks for the write up! That error is actually the default error returned from PubSub when they close a stream. The reason it occurs after 30 minutes is because thats when PubSub tends to kill off any streaming connections.

When you see this error do messages continue to come in? Or does the Subscription stop functioning altogether?

@callmehiphop callmehiphop added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 22, 2019
@ThomWright
Copy link
Author

That's difficult to say, when one of our services detects an error from a subscription it starts failing health checks and gets restarted pretty soon after. Even if messages could continue to arrive, I'd be unlikely to see them.

After rolling back to 0.21.1 I no longer see these errors.

@eezing
Copy link

eezing commented Jan 23, 2019

@callmehiphop Subscription stops functioning altogether for me. I've only seen this error on v0.23.0.

@callmehiphop
Copy link
Contributor

I just made a release (0.24.0) that should resolve the issue you're seeing. If you continue to encounter this issue, please let us know! Thanks again for the report!

@ThomWright
Copy link
Author

That seems to have fixed it, thanks.

@google-cloud-label-sync google-cloud-label-sync bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Jan 31, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
@rthotakura-wp
Copy link

rthotakura-wp commented Oct 2, 2020

I still see the issue happening once a while with 2.5.0 and it does not look like an issue with one GCP service or client.

googleapis/nodejs-firestore#1023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

5 participants