-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Tomcat has a limit on the size of a single message that can be received via websocket. This is discussed here:
https://github.com/JeffersonLab/epics2web/wiki/Advanced-Configuration#tomcat-message-size-limit
epics2web provides a simple chunking mechanism to break up large requests into many smaller ones. It does this by allowing users to set a max number of PVs per request. Or, if not specified, a default of 400 PV names is used. This heuristically was good enough in the past. We've now found a screen where this doesn't work.
The best solution would be to partition the requests by size, not by number of PVs. Tomcat has a default message size of 8KiB. The monitor API could be updated to automatically partition on a configurable max message size, instead of max number of PVs.
Problem Screen:
https://epicsweb.jlab.org/wedm/screen?edl=/usr/opsuser/mccops/edm/lcw/johnson_controls.edl
Note: We could update WEDM to set a lower max number of PVs in a chunk, say to 100. A better fix is to handle this for the general case though.
The current API results in chunking the monitor request into two messages:
Notice the first one is about 18KB.
See Also: https://github.com/JeffersonLab/epics2web/wiki/API-Reference#options