Closed damc closed 1 year ago
Also, if it's the library, would it be possible somehow to configure so that it doesn't close the connection when the message is too big, but simply throws an exception?
This is a security limit. Look for the max_size
parameter in the docs for how to change it.
I had a bug in my program and I traced it down. It turned out that the connection was closing because the message that client was trying to send was too big.
That's what I've found in the logs:
DEBUG:websockets.server:! failing connection with code 1009 DEBUG:websockets.server:= connection is CLOSING DEBUG:websockets.server:> CLOSE 1009 (message too big) [2 bytes] DEBUG:websockets.server:x half-closing TCP connection DEBUG:websockets.server:= connection is CONNECTING
My question is: what does impose that limit on how big the message can be? Is that a limit imposed by the server? Is it imposed by the websockets package?