Batch Recipe Too Large Error
By default, Ignition/Jetty sets a maximum message size of 2048kb when using a Perspective Session. If a Batch Recipe is too large and validation/saving is attempted, a MessageTooLargeException warning throws to the logs, and the WebSocket disconnects from the session. The session stays open and attempting to validate/save the Recipe indefinitely, until you close and re-open the session.
|
Max message size is 2147483647, which is the max value of the integer datatype for this setting. Any value over that number, the system reverts to the default value of 2097152. |
How to change the default maximum message size, and prevent the issue above.
- Open the ignition.conf file that is located in the data folder in your Ignition installation path with a text editor.
- Within the ignition.conf file, scroll down to where it says # Java Additional Parameters (this is the location where JVM parameters are added into Ignition and where we will be adding our web socket max message size parameter).
- Copy/Paste the following line in the # Java Additional Parameters section of the ignition.conf file:
wrapper.java.additional.X=-Dperspective.websocket.max-message-size=#
- Replace X in the line with the next sequential parameter number that is seen in the file.
- Replace # in the line with the websocket max message size value in KB (the default size is 2048 KB when no value is specified).
- Save changes to the ignition.conf file.
- Restart the Ignition Gateway service for the changes to take effect.