Control Worker Restarts Using Dashboard
In the MATLAB® Production Server™ on-premises dashboard, you can configure the MATLAB workers to restart based on a specified amount of time (uptime) or based on the amount of memory in use.
Restart Workers Based on Uptime
As worker processes evaluate MATLAB functions, the MATLAB workspace accumulates saved states and other data. This accumulated data can occasionally cause a worker process to fail. One way to avoid random worker failures is to configure the server instances to restart worker processes when they have been running for a set period or time.
Select the server instance from the leftmost navigation pane.
Select the Settings tab.
Expand the Worker area.
Set Worker Restart Interval to the restart interval.
For example, to restart workers at intervals of 1 hour, 15 minutes, and 5 seconds set the property to
1:15:05
.Click Save.
Restart the server instance.
Restart Workers Based on Amount of Memory in Use
Another way to avoid random worker failures is to configure the server instances to restart worker processes when they begin consuming a predefined amount of memory.
To do this, adjust three configuration properties:
Worker Memory Check Interval — Interval at which workers are polled for memory usage
Worker Restart Memory Limit — Size threshold at which to consider restarting a worker
Worker Restart Memory Limit Interval — Interval for which a worker can exceed its memory limit before restart
To adjust memory-based restart thresholds:
Select the server instance from the leftmost navigation pane.
Select the Settings tab.
Expand the Worker area.
Set Worker Memory Check Interval to a restart interval.
For example, to check workers at intervals of 1 hour, 15 minutes, and 5 seconds, set the property to
1:15:05
.Set Worker Restart Memory Limit to the memory limit at which workers are monitored for possible restart.
For example, to start timing workers when they consume at least 1 GB of memory, set the property to
1GB
.Set Worker Restart Memory Limit Interval to the interval during which a worker can exceed the memory limit.
For example, to restart workers when they exceed the memory limit for 1 hour, set the property to
1:00:00
.Click Save.
Restart the server instance. See Restart Server Instance.