Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Websocket dies if received packet size from controller is over 1MB #136
Comments
|
I'm a bit reluctant to completely remove any limit on the frame size, but I guess the initial AllWatcher frame contains the entire model description, so the size will be dependent on the model being connected to. |
rahnarsson
commented
Jun 12, 2017
|
Yes. Complete removal might be too harsh. But I think that size should definitely be increased or at least make possible to change when creating connection. |
rahnarsson
commented
Jun 13, 2017
|
I can see this causing problems when the model has been running for a while and there is lot of changes during time. Let's say the model has been running for a year or so, and some charm provides actions that users run on a regular basis. |
|
I'm asking on the juju-dev mailing list to find out if there is a maximum frame size on the controller side that we can match. Even if there's not currently, I think the initial AllWatcher frame on connect is likely to be the largest frame, and it will only depend on the size of the current state of the model (not changes over time), so we should be able to come up with a reasonable upper bound. But, in the end, the controller will need to ensure that large enough models have the initial AllWatcher frame chunked. |
rahnarsson commentedJun 9, 2017
Error from the node:
Websocket connection error 1009 shows:
Changing juju/client/connection.py:
self.ws = await websockets.connect(url, **kw)
to
self.ws = await websockets.connect(url, max_size=None, **kw)
Fixes the connection issues.