Skip to content

Advanced Configuration

Ryan Slominski edited this page Oct 16, 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>16384</param-value>
</context-param>
<context-param>
    <param-name>org.apache.tomcat.websocket.binaryBufferSize</param-name>
    <param-value>16384</param-value>
</context-param>  

Another option is to send monitor / clear requests to the server in batches of no more than a moderate number of PV names. This is done automatically by default in epics2web and controlled via the chunkedRequestPvsCount option. By default no more than 400 PV names will be transmitted at a time - the software will automatically issue multiple requests if necessary. With this option disabled the message limit can be reached for example by calling the jlab.epics2web.monitorPvs(pvs) method with 1000 PV names of 9 characters each.

Clone this wiki locally