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.

Topic creation fails with DEADLINE_EXCEEDED error

See original GitHub issue

We create topics like this

const client = new PubSub()
const topic = client.topic('topic-name')
await this.topic.create()

It was working fine before but started failing with DEADLINE_EXCEEDED error after we updated to the latest version 2.18.1. We enabled gRPC debug mode and saw that all gRPC requests are sent with grpc-timeout header close to 5sec. After 5 seconds we get the error.

te: trailers
:path: /google.pubsub.v1.Publisher/CreateTopic
:method: POST
content-type: application/grpc
user-agent: grpc-node-js/1.3.6
:authority: pubsub.googleapis.com:443
accept-encoding: identity
grpc-accept-encoding: identity,deflate,gzip
authorization: 
x-goog-request-params: 
grpc-timeout: 4997m
x-goog-api-client: gax/2.25.0 gapic/2.18.1 gl-node/16.2.0 grpc/1.3.6 gccl/2.18.1

We checked with older version 2.8.0 and the grpc-timeout header is equal to 60 seconds. And topics were created fine. And it seems it also takes arount 5sec to create a topic. Looks like smth was changed between theses two version.

te: trailers
:path: /google.pubsub.v1.Publisher/CreateTopic
:method: POST
content-type: application/grpc
user-agent: grpc-node-js/1.2.9
:authority: pubsub.googleapis.com:443
accept-encoding: identity,gzip
grpc-accept-encoding: identity,deflate,gzip
grpc-timeout: 60000m
authorization: 
x-goog-request-params: 
x-goog-api-client: gax/2.10.3 gapic/2.10.0 gl-node/14.6.0 grpc/1.2.9 gccl/2.10.0

We tried to pass timeout attribute in topic.create method but it did not make any difference. Is there any way to increase/override the grpc-timeout value?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kthilagarajancommented, Nov 10, 2021

Got the same issue. Tried with 2.17.0, it worked.

1reaction
kamalaboulhosncommented, Nov 3, 2021

@feywind The intention was for the change to 5 seconds to only affected Publish calls, not CreateTopic calls. CreateTopic should have a deadline of 60s.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ingress creating fails with "context deadline exceeded" #6323
EDIT: I am going to assume my issue was completely unrelated, re-installing docker/kubernetes solved my ingress-nginx controller startup issues ...
Read more >
Troubleshooting DEADLINE_EXCEEDED errors on Cloud ...
When accessing Cloud Spanner APIs, requests may fail due to “Deadline Exceeded” errors. This error indicates that a response has not been ......
Read more >
Why am I seeing `context deadline exceeded` errors
In this particular case Vault was leveraging Consul as its backend, and was having an issue. Possible Causes: Network Latency. Firewall Rules / ......
Read more >
Troubleshoot deadline-exceeded error - Temporal Docs
A resource exhausted error can cause your client request to fail, which prompts the deadline exceeded error.
Read more >
Google Cloud PubSub Error: Deadline Exceeded
Turns out I was creating too many PubSub clients! I moved this part outside the function / route so that the topic and...
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