Skip to content

fix: do not arm client-side timeout on long-lived gRPC streams#680

Merged
jwulf merged 1 commit into
mainfrom
fix/stream-client-side-timeout
Mar 18, 2026
Merged

fix: do not arm client-side timeout on long-lived gRPC streams#680
jwulf merged 1 commit into
mainfrom
fix/stream-client-side-timeout

Conversation

@jwulf

@jwulf jwulf commented Mar 18, 2026

Copy link
Copy Markdown
Member

Description of the change

The generic ${methodName}Stream wrapper in GrpcClient.ts arms a client-side timeout on all streaming RPCs, using requestTimeout ?? longPoll as the duration.

StreamActivatedJobs has no requestTimeout field, so the fallback to longPoll (default 50 s) fires after ~51 s, emitting 'end' and destroying the stream. Since ZBStreamWorker has no reconnection logic, the stream dies silently and only the sidecar poll (every 30 s, max 32 jobs) continues — capping throughput at ~70-100 jobs/s instead of the expected ~1000.

Fix

Guard the timeout so it only fires when requestTimeout is explicitly set on the request (!= null && !== 0 && !== -1), leaving long-lived streams untouched.

Type of change

  • Bug fix

Checklist

  • I have read the CONTRIBUTING doc
  • I have opened this pull request against the main branch

StreamActivatedJobs has no requestTimeout field, but the generic
Stream wrapper fell back to longPoll (50 s) and destroyed the stream
after ~51 s.  Only the sidecar poll continued working, capping
throughput at ~70-100 jobs/s instead of the expected ~1000.

Guard the timeout so it only fires when requestTimeout is explicitly
set on the request, leaving long-lived streams untouched.
@jwulf jwulf temporarily deployed to integration-8.8 March 18, 2026 18:14 — with GitHub Actions Inactive
@jwulf jwulf added bug Something isn't working as intended zeebe-client backport stable/8.8 labels Mar 18, 2026
@jwulf jwulf merged commit 3df74cb into main Mar 18, 2026
14 of 18 checks passed
@backport-action

Copy link
Copy Markdown
Collaborator

Successfully created backport PR for stable/8.8:

@github-actions

Copy link
Copy Markdown

Released in v8.9.0-alpha.5 (npm: @camunda8/sdk@8.9.0-alpha.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants