2.13.1. General information about Supervisor

Attention!

For business hosting only.

Supervisor is a Linux process manager. It starts the specified processes, monitors their operation and automatically restarts them if they stop working. For each process you can set the required number of instances — the number of simultaneously running instances of the process. In this way, you can organize the necessary number of different processes to run continuously in the background.

  1. Open the "Supervisor" section.
  2. Click "Add process".
  3. Fill out the form and click "Save":
    • "Process" — command whose operation process should be supported by Supervisor.
    • "Do not try to find the required handler for the specified command and run as is" — disables automatic change of the command when saving (the logic is described in the article Add cron task).
    • "Number of Instances" — how many concurrent processes with copies of the command the Supervisor should support.
    • "Comment" (optional) — comment on the process.
    • "Run immediately after adding" (enabled by default) — automatically start the process immediately after adding or do it later manually.

Once saved, Supervisor will automatically start the specified number of process instances and keep them running.

Important points:

  • When a process is stopped or restarted, all previously started instances forcibly terminate within 2-3 seconds.
  • Changes in the code of a running process are applied only when the instance is restarted. This is because script code is read and compiled only at startup.

All added processes are displayed in the list. Actions are available for each process:

  • "Edit" — change the process settings (options are the same as when adding).
  • "Suspend" and "Resume" — stop and resume Supervisor tracking of the process.
  • "Restart" — restart the process (start new instances).
  • "View stdout" — view the last 100 lines of console output from all process instances.
  • "Delete" — delete process.
Content