Plesk

Automatic Restart of Crashed Services with Systemd

On Linux distributions that use the systemd init system
(Debian 8, Debian 9, CentOS/RedHat 7, Ubuntu 16, and Ubuntu 18),
Plesk instructs systemd to restart certain services if they crash:

The systemd restart has the following settings, which you can customize
via panel.ini file:

To customize the automatic restart of the crashed services with systemd:

  1. Add the systemd settings that you want to change to the panel.ini file
    under the [systemd] section. For example:

    [systemd]
    Service.RestartSec = 7
    Service.Restart = always
    
  2. For the customized settings to take effect, run the command of the following pattern:

    /usr/local/psa/admin/sbin/register_service --enable <service>
    

    where <service> is any service from this list.

    For example,

    /usr/local/psa/admin/sbin/register_service --enable sw-engine
    

Then the customized settings will be applied.

Note: Certain services (for example, Fail2ban, PostgreSQL, and some others)
have their own systemd restart settings, which can be
different from the default ones.
The restart settings customized via panel.ini will not be
applied to these services.