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

Periodically getting unavailable response codes for streaming pulls and expired for acks #411

Closed
yakivy opened this issue Oct 28, 2020 · 4 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@yakivy
Copy link

yakivy commented Oct 28, 2020

Environment details

  1. Pubsub
  2. OS type and version: ubuntu:20.04
  3. Java version: openjdk:11.0.9
  4. pubsub version(s): google-cloud-pubsub lib, 1.103.1 or 1.108.6 version

Steps to reproduce

  1. Create subscription with ackDeadline=600 seconds
  2. Publish solid number of messages (in my case it was ~20k stale messages with 1 rps increase)
  3. Create a com.google.cloud.pubsub.v1.Subscriber with 8 outstanding elements that is instantly putting incoming messages into queue and queue consumer that is consuming and acknowledging messages from the queue with 2 rps throughput:
val queue = ...
Subscriber
    .newBuilder(
        subscription,
        (message, ackCallback) => queue.offer(message -> ackCallback)
    )
    .setFlowControlSettings(FlowControlSettings.newBuilder()
        .setMaxOutstandingElementCount(8)
        .setLimitExceededBehavior(LimitExceededBehavior.Block)
        .build()
    )
    .build()
    .startAsync()
  1. Monitor stackdriver charts during one hour:
  • acknowledge message operations chart should have ~45 min periods, where during ~15 first mins all acks are success and ~30 following mins all acks are expired:

  • streaming pull message operations chart should have unavailable response codes each ~45 mins:

Hope for your attention. Thanks!

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label Oct 28, 2020
@yakivy yakivy changed the title Unavailable response codes for streaming pull and acks expiration Periodically getting unavailable response codes for streaming pulls and expired for acks Oct 28, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 29, 2020
@hannahrogers-google hannahrogers-google added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Oct 29, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Jan 27, 2021
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 26, 2021
@meredithslota
Copy link

@hannahrogers-google Can you please take a look or assign elsewhere?

@hannahrogers-google
Copy link
Contributor

hannahrogers-google commented May 6, 2021

UNAVAILABLE errors can be expected occasionally, this is part of normal operation and should not affect performance.

But, I am happy to look into the expired acks. Are you seeing this issue consistently (15 minutes of successful acks, 30 minutes of expired acks)? Is there a large message backlog at this time?

@hannahrogers-google hannahrogers-google added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed 🚨 This issue needs some love. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 6, 2021
@yakivy
Copy link
Author

yakivy commented May 7, 2021

@hannahrogers-google Yes, I saw them consistently with backlog of >20k messages. Because of that issue I was forced to migrate to pulling approach that implies extra latency but is more stable for large backlogs, so I'm not able to confirm that this issue is still reproducible.

@hannahrogers-google
Copy link
Contributor

Created pr/721 to retry acks and modacks on UNAVAILABLE errors to help mitigate this issue.

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/java-pubsub API. priority: p3 Desirable enhancement or fix. May not be included in next release. 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

4 participants