actix / actix-extras

A collection of additional crates supporting the actix and actix-web frameworks.
https://actix.rs
Apache License 2.0
760 stars 191 forks source link

Support setting maximum WebSocket frame size for streaming (non-actor) handlers #452

Open singularsyntax opened 1 month ago

singularsyntax commented 1 month ago

Expected Behavior

There should be a way to increase the maximum WebSocket frame size for streaming (non-actor) stream handlers. Whenever sending large payloads through WebSockets, I'm getting this error on the server:

WebSocket stream error: payload reached size limit

Current Behavior

As per above.

Possible Solution

I attempted to implement solution on an in-tree branch of actix-extras, but it is not working:

https://github.com/singularsyntax/actix-extras/commit/18c17b5027d64060a0bf659eaa48f15df7efe89a

Steps to Reproduce (for bugs)

  1. Generate a WebSocket message frame on a client exceeding the default max frame size (64k).

Context

Your Environment

robjtede commented 1 month ago

I guess what we want is something similar to actix-web-actor's WsResponseBuilder in actix-ws.

dinmukhamedm commented 1 month ago

+1 on this; this is blocking our migration from the now deprecated actix-web-actors