-
Notifications
You must be signed in to change notification settings - Fork 598
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: Received RST_STREAM with error code 2 #2619
Comments
@lafama thanks for reporting. I believe this already being investigated, but this message is almost always received when the PubSub api closes a stream. However we usually retry on that specific error, so I'm intrigued as to why you're seeing it. I'm unable to reproduce with the steps you've provided, so if you could provide us with a gist/repo/etc. that reproduces the error you're seeing, that would help tremendously. |
What would make PubSub api close a stream? My worker process hangs after this error and i have to keep restarting it. The challenge reproducing this is that it occurs infrequently and at random time in production. It also only stated when upgrade to 0.14.0 from 0.13.0 |
The streaming API is new, hence why this only occurs in 0.14.x. Prior to this release we manually polled the servers. Usually the PubSub API closes the stream after about 30 minutes. However, the only time we would emit an error like this would be if the client was unable to re-establish a connection within 5 minutes of the previous connections closing. So it might be that the server closes the connection and won't allow for any new connections. @jganetsk for thoughts here. If that turns out to be the case, then you might want to consider re-creating the subscription object when that error fires, possibly with a backoff of some kind. |
Is there some way to confirm that the user is experiencing a prolonged absence of connectivity, and that's why the error is occurring? Maybe the client library's error handling code has a bug. |
@jganetsk I think you're right, after investigating it seems that the |
I don't know these details. I trust you and @lukesneeringer can work them out. |
This error seems to occur exactly 34 minutes into processing. So i have to restart my worker process every 34th Minute.. |
@lafama I'm working on resolving this, however in the mean time I would suggest downgrading to 0.13. |
Downgraded to 0.13.1. Works for now, @callmehiphop update me, when the issue is fixed |
@callmehiphop this PR seems to work fine, so far in tests no errors are being logged and the process does not hung 👍 |
Just realised that after a while no new messages are being pulled but no errors are logged. |
Are you running your code in a specific environment (GKE?) and do you know after about how long do the messages stop coming? |
No am running the code on my comp (OS: darwin x64). Will update on the exact time later |
@lafama we issued a release today that I believe will address this issue, so I'm going to close it. If you think I closed it prematurely, please feel free to re-open. |
Environment details
Steps to reproduce
google-cloud/pubsub
subscription=pubsub.topic('awesomeTopic).subscription('awesomeTopicSubcription',{reuseExisting: true})
3.
The text was updated successfully, but these errors were encountered: