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.

Publisher total timeout value change exposing potential long-running publisher issues

See original GitHub issue

Environment details

  • OS: Alpine linux
  • Node.js version: 14.15
  • npm version: 6.14
  • @google-cloud/pubsub version: 2.18.1

Issue Summary

After upgrading @google-cloud/pubsub versions from 2.16.6 to 2.18.1 (and not making any other changes), users are seeing a higher rate of occurrence for this error:

"Error: Total timeout of API google.pubsub.v1.Publisher exceeded 60000 milliseconds before any response was received".

However along with occurring less often on version 2.16.6, the error message was slightly different (the total timeout went from 600000 to 60000):

"Error: Total timeout of API google.pubsub.v1.Publisher exceeded 600000 milliseconds before any response was received".

There was only one change made to the publisher config but it only changed the initial timeout. The publisher config file shows no change in the total timeout between versions 2.18.1 and 2.16.6.

Here is the sample code shared by the user, but it was not changed when the library version was upgraded

    const topicOptions = {
      batching: {
        maxBytes: 5242880,
        maxMessages: 50,
        maxMilliseconds: 400,
      },
    };
const topic = new PubSub(options).topic(topicName, topicOptions);
await topic.publish(Buffer.from(JSON.stringify(normalizedEventData)));

There were also a few recent flaky-bot issues opened with similar error messages:

We would like to know whether this would require some tweaks to the way the user is currently publishing, or if this was an unintentional change introduced in the newer versions of the library.

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:26 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
feywindcommented, Jun 14, 2022

I wanted to repost this on here in case it gets anyone going:

  topic.setPublishOptions({
    gaxOpts: {
      timeout: 600000,
    }
  });

That should theoretically boost the timeout for the gax/rpc calls, back to where it was before the change earlier. I don’t think it solves whatever the underlying issue is, but I’m all about getting people going.

1reaction
kylechadhacommented, Nov 16, 2021

@feywind Can confirm the PubSub object is created once and reused for subsequent publishes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tips to help prevent long-running reports from timing out
Specify the report execution time-out period for all reports · Click Site Settings. The Properties page is displayed. · In the Report Timeout ......
Read more >
Google Cloud Pub/Sub Reliability User Guide: Part 1 Publishing
We recommend starting with a total timeout of 10 minutes and an initial RPC timeout of 10 seconds. Longer retry periods make your...
Read more >
Setting Timeout Periods for Daemons, Queries, and Sessions
To keep long-running queries or idle sessions from tying up cluster resources, you can set timeout intervals for both individual queries, and ...
Read more >
CS26448 - How to configure the WVS Publisher timeouts ...
Publishing certain large CAD Drawings or Models is failing repeatedly with the error: Timeout exceeded waiting for a reply from the CadAgent -...
Read more >
Servers: hosting Pyro objects — Pyro 4.82 documentation
import Pyro4 class PyroService(object): value = 42 # not exposed def ... want to change existing source code, it's not possible to use...
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