Skip to content

All acks are expired after 30 min of activity with v0.23.0+ #468

@dinvlad

Description

@dinvlad

Environment details

  • Hardware: on-prem 8-core compute node
  • OS: RHEL 6.9
  • Node.js version: 8.11.3
  • npm version: 6.4.0
  • @google-cloud/pubsub 0.23.0-0.24.1:

Steps to reproduce

  1. Publish a moderate number of messages to a topic (~4k in our case)
  2. Use a single subscriber that processes each message within 1-2 min, e.g. with the following code:
const subscription = pubSub.subscription(SUBSCRIPTION_NAME, {
  flowControl: {
    maxMessages: 2,
    allowExcessMessages: false,
  },
});
subscription.on("message", ({ ack }) => {
  setTimeout(ack, 60000 * 2 * Math.random());
});
subscription.on("error", console.error);
  1. After ~30 min of churning through messages, Stackdriver shows that:
    - num_undelivered_messages stops going down
    - pull_ack_message_operation_count marks every message ack as expired
    screen shot 2019-02-07 at 2 11 10 am
    - streaming_pull_message_operation_count shows that 10-min pull interval stops.
    screen shot 2019-02-07 at 1 53 23 am

As a net result, we can't seem to ack any more messages and have to restart the subscriber.

We varied settings like flowControl.maxMessages (1-4) and ackDeadline (10, 300, 7200, 720000) and that didn't seem to have an effect.

Downgrading to 0.22.2 seems to resolve this issue. We still get occasional expired acks, but not in 100% of cases.

Thanks!

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: pubsubIssues related to the googleapis/nodejs-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.triaged for GAtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions