{
"path": "/posts/2016/2016-04-12-quickstart-supervisor",
"site": "at://did:plc:mracrip6qu3vw46nbewg44sm/site.standard.publication/self",
"tags": [
"code",
"supervisor"
],
"$type": "site.standard.document",
"title": "Quickstart `supervisor` guide",
"updatedAt": "2016-04-12T12:15:00.000Z",
"publishedAt": "2016-04-12T12:15:00.000Z",
"textContent": "supervisor is a UNIX utility to managing and respawning long running Python processes to ensure they are always running. Or according to its website:\n\n> Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.\n\nInstallation\n\nsupervisor can be installed with pip\n\nGiven a script test_proc.py, start the process under supervisor as\n\nNow it will run forever and you can see the process running with\n\nYou can stop the process with\n\nLogs, by default, are written to /var/log/supervisor\n\nThe supervisor configuration can be found at /etc/supervisor/supervisor.conf\n\nConfigurations can be added to the supervisor.conf file for specific apps. Below we specify a configuration for the test_proc process, using a rotating file logger with two backups for both stdout amd stderr and a max file size of 100KBs.\n\nAfter the script runs for a while, the output logs will look something like this:\n\nMore configurations for supervisor can be found here.",
"canonicalUrl": "https://www.danielcorin.com/posts/2016/2016-04-12-quickstart-supervisor"
}