Pubsub 0.35.3 stop consuming messages - ConsumeBidirectionalStream exited RPC
See original GitHub issueAfter an ~hour, the rpc connection is closed:
[2018-06-06 11:02:36,258 - INFO - Thread-14 - streaming_pull_manager] Observed recoverable stream error 504 Deadline Exceeded
[2018-06-06 11:02:36,259 - INFO - Thread-ConsumeBidirectionalStream - streaming_pull_manager] Observed recoverable stream error 504 Deadline Exceeded
[2018-06-06 11:02:36,260 - INFO - Thread-14 - streaming_pull_manager] Observed recoverable stream error 504 Deadline Exceeded
[2018-06-06 11:02:36,260 - **ERROR - Thread-ConsumeBidirectionalStream - bidi] The bidirectional RPC unexpectedly exited. <google.api_core.grpc_helpers._StreamingResponseIterator object at 0x7fb758946090>**
I need to cancel and start the subscriber again.
OS type and version - “Debian GNU/Linux 8 (jessie)” Version - Python 2.7.9 4. pip freeze | grep pubsub google-cloud-pubsub==0.35.3
Code example:
def subscriber_handler(message):
path = message.attributes.get("type")
self.handler_function(path=path, body=message.data)
message.ack()
self.listening_subscriber = self.subscriber.subscribe(subscription_path, callback=subscriber_handler, flow_control=flow_control)
All the other info is the same as in https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5325.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
Error Codes | Cloud Pub/Sub Documentation
Error HTTP Code Description
UNAUTHENTICATED 401 The client is not authenticated properly.
UNAVAILABLE 503 The service was unable to process a request.
Read more >Google PubSub python client returning StatusCode ...
I am trying to establish a long running Pull subscription to a Google Cloud PubSub topic. I am using a code ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I upgraded to 35.4 and i am still having the issue where my subscriber stops pulling from a subscription. My environment is in kubernetes and should be pulling 40-50 messages a second. Looking at the logs i get the following:
Jun 26, 2018, 12:58:14 PM | INFO:google.cloud.pubsub_v1.subscriber._protocol.leaser:Thread-LeaseMaintainer exiting. INFO:google.cloud.pubsub_v1.subscriber._protocol.heartbeater:Thread-Heartbeater exiting. INFO:google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager:Observed recoverable stream error 504 Deadline Exceeded
After this it seems to go into an endless loop of:
INFO:google.cloud.pubsub_v1.subscriber._protocol.bidi:Re-established stream INFO:google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager:Observed recoverable stream error 504 Deadline Exceeded
Every ten minutes after that it re-establishes the stream then immediately gets the 504 error without pulling any more messages from the subscription. Any ideas?
0.35.4
has been released which resolves this as far as I’m able to test. Please let me know if you’re able to reproduce this with that version and we’ll continue digging.