Skip to content

[Backport release-1.19] fix: accept workflow work items larger than gRPC's 4MB default (#1860) - #1865

Merged
javier-aliaga merged 1 commit into
dapr:release-1.19from
JoshVanL:backport-1860-to-release-1.19
Oct 22, 2026
Merged

javier-aliaga merged 1 commit into
dapr:release-1.19from
JoshVanL:backport-1860-to-release-1.19

Conversation

@JoshVanL

Copy link
Copy Markdown
Member

The workflow runtime builds its sidecar channel with the SDK's inbound message limit, dapr.grpc.max.inbound.message.size.bytes, which defaults to 4MB. The sidecar sends work items up to its own max body size, which apps raise for large payloads, so a work item over 4MB (for example a fan-out of five 1MB activity results) failed the GetWorkItems stream with RESOURCE_EXHAUSTED. The worker reconnected, the sidecar redelivered the same work item, and it failed again, so every workflow on the worker stalled. The history fetch after a stateful history cache miss had the same limit.

(cherry picked from commit ae6016d)

Description

Please explain the changes you've made

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

…1860)

The workflow runtime builds its sidecar channel with the SDK's inbound
message limit, dapr.grpc.max.inbound.message.size.bytes, which
defaults to 4MB. The sidecar sends work items up to its own max body
size, which apps raise for large payloads, so a work item over 4MB
(for example a fan-out of five 1MB activity results) failed the
GetWorkItems stream with RESOURCE_EXHAUSTED. The worker reconnected,
the sidecar redelivered the same work item, and it failed again, so
every workflow on the worker stalled. The history fetch after a
stateful history cache miss had the same limit.

Signed-off-by: joshvanl <me@joshvanl.dev>
(cherry picked from commit ae6016d)
Signed-off-by: joshvanl <me@joshvanl.dev>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 13:09
@JoshVanL
JoshVanL requested review from a team as code owners October 22, 2026 13:09
@javier-aliaga javier-aliaga changed the title fix: accept workflow work items larger than gRPC's 4MB default (#1860) [Backport release-1.19] fix: accept workflow work items larger than gRPC's 4MB default (#1860) Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped override addresses both affected receive paths, and the regression test exercises actual transport message-size enforcement.

No open issues 🎉

What changed in this PR

This PR prevents oversized workflow work items and history responses from repeatedly failing the worker’s gRPC receive limit and stalling workflow processing.

Changes:

  • Overrides the worker stub’s inbound message limit without changing the shared channel configuration.
  • Adds a TCP-based regression test that verifies processing a 6 MB activity payload through a channel configured with a 4 MB limit.
File Description
durabletask-client/​src/​test/​java/​io/​dapr/​durabletask/​DurableTaskGrpcWorkerLargeWorkItemTest.java Tests successful processing of a work item exceeding the default receive limit.
durabletask-client/​src/​main/​java/​io/​dapr/​durabletask/​DurableTaskGrpcWorker.java Raises the worker stub’s inbound message limit for work items and history responses.

Review effort: Balanced

@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.11%. Comparing base (e53f859) to head (f5fe52e).

Additional details and impacted files
@@                Coverage Diff                 @@
##             release-1.19    #1865      +/-   ##
==================================================
- Coverage           80.21%   80.11%   -0.10%     
  Complexity           2798     2798              
==================================================
  Files                 273      273              
  Lines                8278     8278              
  Branches              896      896              
==================================================
- Hits                 6640     6632       -8     
- Misses               1270     1278       +8     
  Partials              368      368              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@javier-aliaga
javier-aliaga merged commit ef5f13e into dapr:release-1.19 Oct 22, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants