Skip to content

Advanced Configuration

Ryan Slominski edited this page Feb 13, 2017 · 8 revisions

Message Size Limit

There can be a limit to the size of a single websocket message. In Tomcat the default maximum message size is 8192 bytes. If you hit this limit you may get an error in the browser console that reads:

The decoded text message was too big for the output buffer and the endpoint does not support partial messages

You can configure Tomcat to have a bigger maximum (consider the server memory requirements though). Edit the web.xml file and add the following:

<context-param>
    <param-name>org.apache.tomcat.websocket.textBufferSize</param-name>
    <param-value>32768</param-value>
</context-param>
<context-param>
    <param-name>org.apache.tomcat.websocket.binaryBufferSize</param-name>
    <param-value>32768</param-value>
</context-param>  
Clone this wiki locally