Main Content

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.

  1. Select the server instance from the leftmost navigation pane.

  2. Select the Settings tab.

  3. Expand the Worker area.

  4. 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.

  5. Click Save.

  6. 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:

  1. Select the server instance from the leftmost navigation pane.

  2. Select the Settings tab.

  3. Expand the Worker area.

  4. 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.

  5. 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.

  6. 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.

  7. Click Save.

  8. Restart the server instance. See Restart Server Instance.

See Also

Properties

Related Topics