-
-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket disconnect happening when uploading a base64 file with size > 1MB #432
Comments
I added this test that confirms it, it passes fine at 1048576
I'm not familiar enough with websocket protocol but it looks like from https://github.com/aaugustin/websockets/blob/46ddc64b3ab02f38579880a812b9c04da6d89ae1/src/websockets/protocol.py#L123-L127
in case of WSProtocol test it ends with
in case of WebSocketProtocol it ends with
|
Attaching logs. |
Seems like you can pass arbitrary size on WSProtocol using kwarg max_size in connect methoid, oddly it fails on WebSocketProtocol
|
Thought there would be any setting in the Uvicorn configuration. Closing this as a duplicate of #306 |
@madhu150894 did you ever find a solution to this? I'm also using channels and getting the exact same issue. Cannot find anything helpful on the matter and would appreciate any knowledge you found! |
@machineslearnoliver We are using Hypercorn as the ASGI server now, it has an option to customize the max_size limit. |
@madhu150894 You’ve saved my week, thank you! |
We are using Django-channels to handle WebSockets and Uvicorn as ASGI server.
Everything is working fine when normal text messages are sent over WebSocket, but the WebSocket disconnect is happening when we send a base64 field ith size greater than 1MB. It is able to handle the files which are less than 1MB.
Same is the issue when uviron is run independently or by configuring it along with gunicorn(like the way how it is mentioned in the deployment documentation)
The text was updated successfully, but these errors were encountered: