Publishing hangs with fresh PublisherClient instance #977
Labels
api: pubsub
Issues related to the googleapis/python-pubsub API.
type: question
Request for information or clarification. Not an issue.
Howdy folks,
We ran across undesirable behavior stemming from this python pubsub library. We found several unintuitive workarounds (described below), and we're sharing the behavior here for the developers' benefit, and for others who run into this behavior.
Briefly, we found that a submitting many jobs of intermediate message size to a nascent PublisherClient instance causes publishing to hang. Smaller or larger messages don't seem to cause hanging. The problematic message size threshold can be altered by changing the Publisher batch settings. Submitting a single job to the PublisherClient to completion also suppresses this behavior, as does checking credentials before submitting the bolus of jobs.
We do see a stack trace that suggests an authentication issue reminiscent of similar issues reported in other related libraries, such as this one, but we believe the issue stems from how pubsub handles credentials and job batching.
All this and more is enumerated in the code for reproducing the behavior.
Also of note: we could only reproduce this behavior on ubuntu. I could not figure out how to reproduce this on a mac.
Environment details
Steps to reproduce
Code example
# example
Stack trace
Subsequent attempts to submit jobs in the same python thread will eventually yield the following traceback:
The text was updated successfully, but these errors were encountered: