Contenuto principale

Control Worker Restarts Using Admin Portal

R2026b

In the MATLAB® Production Server™ on-premises admin portal, 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 Configuration tab.

  2. Expand the Workers menu.

  3. Specify worker-restart-interval as 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.

  4. Click Save.

  5. 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 specified amount of memory.

To adjust memory-based restart thresholds:

  1. Select the Configuration tab.

  2. Expand the Workers menu.

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

  4. Set worker-restart-memory-limit to the memory limit at which to monitor workers for possible restart.

    For example, to start timing workers when they consume at least 1 GB of memory, set the property to 1GB.

  5. Set worker-restart-memory-limit-interval to the interval for which a worker can exceed the memory limit before restart.

    For example, to restart workers when they exceed the memory limit for 1 hour, set the property to 1:00:00.

  6. Click Save.

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

See Also

Properties

Related Procedures