question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ack fails, with "Failed to acknowledge" or Failed to "modifyAckDeadline"

See original GitHub issue

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you’ve tried the usual “quick fixes”:

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS: Ubuntu 18.04
  • Node.js version: 11.15
  • npm version: 6.11.2
  • @google-cloud/pubsub version: 32.0

Steps to reproduce

  1. Use version 0.31 or 0.32

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

80 % of messages fails to ack. Going back to version 0.22.2 the Ack errors disappears.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gberthcommented, Oct 1, 2019

No, native Node with project reference. As errors disappeared after deploying to the cloud, I think you can close this, and keep it as a reference that something is different (probably some network thing) between 0.22 and 1.0.

Regards Gunnar

2reactions
callmehiphopcommented, Sep 16, 2019

@gberth thanks! You might try increasing the request timeout for acks/modacks. You can do it like so

const sub = topic.subscription('my-sub', {
  batching: {
    callOptions: {
      timeout: 60000
    }
  }
});

It might also be worth noting that other users have reported similar issues when they create a lot of Subscription objects. The gRPC channel can only handle so many concurrent streams, so if you do have a lot of Subscription objects, I might suggest trying to either cache and re-use them where possible OR lower the number of streams created per Subscription object.

const sub = topic.subscription('my-sub', {
  streamingOptions: {
    maxStreams: 1
  }
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Method: projects.subscriptions.modifyAckDeadline
Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message...
Read more >
Modify ack deadline in asynchronous subscriber
To get an idea why I'm trying to it: What I want to achieve is a kind of retry mechanism where messages that...
Read more >
subscriptions() - Google Developers
Acknowledging a message more than once will not result in an error. ... To override this value for a given message, call #...
Read more >
How to use modifyAckDeadline method in com.google.cloud ...
modifyAckDeadline (subscription, ackIds, ackDeadlineSeconds); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected ...
Read more >
pubsub - Go Packages
Unless a message is acknowledged within the ack deadline, or the client requests that ... Context, id string, cfg SubscriptionConfig) (*Subscription, error) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found