Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[spicedb] Fix intermittent "Error: 4 DEADLINE_EXCEEDED...Waiting for LB pick" #20637

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

geropl
Copy link
Member

@geropl geropl commented Feb 27, 2025

Description

This PR is a fresh attempt at fixing the gRPC error Error: 4 DEADLINE_EXCEEDED...Waiting for LB pick we see every couple of weeks between server and spicedb. This seems always be triggered by the spicedb pods restarting, while we have active/new requests coming in.

Most likely it's fixed by bumping grpc/grpc-js, as there were at couple of potential fixes between 1.10.8 and 1.12.6 [1, 2, 3, 4, ....].

It turned out we still get the Waiting for LB pick, where the client stalls for ~120s before connecting to upstream again, although the pod is up and Ready after ~5-8s.

To we are catching that specific case now, and re-trying the call with a fresh client.

Next steps:

  • load test in cluster (while manually tearing down spicedb
  • ❓ controlled, temporary rollout to an internal installation

Related Issue(s)

Fixes CLC-370

How to test

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Copy link

socket-security bot commented Feb 27, 2025

Updated and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@authzed/authzed-node@0.15.01.2.2 None +2 4.5 MB authzednpm

🚮 Removed packages: npm/@grpc/grpc-js@1.10.8

View full report↗︎

geropl added 3 commits March 6, 2025 09:26
…5.0 -> 1.2.2

Tool: gitpod/catfood.gitpod.cloud
 - instead of doing retries on two levels, rely on the gRPC-level retries
 - to mitigate the loss of insights, introduce createDebugLogInterceptor
  - client options: use sane defaults derived from the documentation instead of the excessive ones we had in place before
  - use "waitForReady" option: it should a) make our calls for responsive on re-connects, while b) - because we keep re-trying on DEADLINE_EXCEEDED - should be as reliable as before

Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
@roboquat roboquat added size/XL and removed size/L labels Mar 6, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants