-
Notifications
You must be signed in to change notification settings - Fork 5
Advanced Configuration
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 by default automatically and controlled via the chunkedRequestPvsCount option. 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.