Skip to content

feat(rivetkit): configure client connection request size#5055

Closed
rockorager wants to merge 2 commits into
rivet-dev:mainfrom
rockorager:client-connection-request-size
Closed

feat(rivetkit): configure client connection request size#5055
rockorager wants to merge 2 commits into
rivet-dev:mainfrom
rockorager:client-connection-request-size

Conversation

@rockorager
Copy link
Copy Markdown

Description

Adds maxConnectionRequestSize to the RivetKit client config for action requests sent through .connect().

Previously, the client rejected serialized connection action requests above 64 KiB before sending them, even when the actor-side maxIncomingMessageSize was configured
higher. This adds a connection-specific client knob and documents it separately from the server-side WebSocket limits.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • pnpm -F rivetkit test tests/actor-gateway-url.test.ts
  • git diff --check HEAD

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

The client-side WebSocket connection path rejects oversized action requests before sending them to the actor, but the limit was fixed at the default actor incoming message size. Applications that intentionally raise the actor-side limit could still fail locally because the client had no matching configuration knob.

Add maxConnectionRequestSize to the client config and thread it through handles and persistent connections. Keep the name connection-specific because this guard only applies to action requests sent through .connect(), not stateless HTTP actions or raw fetch requests.

Map registry maxIncomingMessageSize into internal clients so local runtime-created clients use the same limit as the actor runtime. Document the client-side setting alongside the actor message-size limits.
@abcxff abcxff self-requested a review May 13, 2026 18:48
@abcxff
Copy link
Copy Markdown
Contributor

abcxff commented May 14, 2026

#5057
Removing clientside limit completely - server-side limit will rule.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants