flexxui / flexx

Write desktop and web apps in pure Python
http://flexx.readthedocs.io
BSD 2-Clause "Simplified" License
3.27k stars 259 forks source link

Lost connection with server: message too big (1009) #745

Closed matkuki closed 10 months ago

matkuki commented 10 months ago

Hi,

I have a flexx application that is working great, but after a few years of operation, a few databases have gotten quite large (over 40MB of JSON data to send through a WebSocket) and sometimes when updating the data from the backend to the web-browser, I get an application crash and the following message:

Lost connection with server: message too big (1009)

I have read in a few places that this limit on WebSockets can be changed, but I don't know where to do it in flexx. Could someone point me to where this can be changed?

Thanks Matic

almarklein commented 10 months ago

I read here that you can add the websocket_max_message_size param to the Application constructor (requires Tornado 4.5):

https://github.com/flexxui/flexx/blob/ce1eb56f82595f13f89590684627911aafbc4ede/flexx/app/_tornadoserver.py#L94-L96