[supervisord] Section Settings

The supervisord.conf file contains a section named[supervisord] in which global settings related to thesupervisord process should be inserted. These are asfollows.

[supervisord] Section Values

logfile

The path to the activity log of the supervisord process. Thisoption can include the value %(here)s, which expands to thedirectory in which the supervisord configuration file was found.

Note

If logfile is set to a special file like /dev/stdout that isnot seekable, log rotation must be disabled by settinglogfile_maxbytes = 0.

Default: $CWD/supervisord.log

Required: No.

Introduced: 3.0

logfile_maxbytes

The maximum number of bytes that may be consumed by the activity logfile before it is rotated (suffix multipliers like “KB”, “MB”, and“GB” can be used in the value). Set this value to 0 to indicate anunlimited log size.

Default: 50MB

Required: No.

Introduced: 3.0

logfile_backups

The number of backups to keep around resulting from activity logfile rotation. If set to 0, no backups will be kept.

Default: 10

Required: No.

Introduced: 3.0

loglevel

The logging level, dictating what is written to the supervisordactivity log. One of critical, error, warn, info,debug, trace, or blather. Note that at log leveldebug, the supervisord log file will record the stderr/stdoutoutput of its child processes and extended info info about processstate changes, which is useful for debugging a process which isn’tstarting properly. See also: Activity Log Levels.

Default: info

Required: No.

Introduced: 3.0

pidfile

The location in which supervisord keeps its pid file. This optioncan include the value %(here)s, which expands to the directoryin which the supervisord configuration file was found.

Default: $CWD/supervisord.pid

Required: No.

Introduced: 3.0

umask

The umask of the supervisord process.

Default: 022

Required: No.

Introduced: 3.0

nodaemon

If true, supervisord will start in the foreground instead ofdaemonizing.

Default: false

Required: No.

Introduced: 3.0

minfds

The minimum number of file descriptors that must be available beforesupervisord will start successfully. A call to setrlimit will be madeto attempt to raise the soft and hard limits of the supervisord process tosatisfy minfds. The hard limit may only be raised if supervisordis run as root. supervisord uses file descriptors liberally, and willenter a failure mode when one cannot be obtained from the OS, so it’suseful to be able to specify a minimum value to ensure it doesn’t run outof them during execution. These limits will be inherited by the managedsubprocesses. This option is particularly useful on Solaris,which has a low per-process fd limit by default.

Default: 1024

Required: No.

Introduced: 3.0

minprocs

The minimum number of process descriptors that must be availablebefore supervisord will start successfully. A call to setrlimit will bemade to attempt to raise the soft and hard limits of the supervisord processto satisfy minprocs. The hard limit may only be raised if supervisordis run as root. supervisord will enter a failure mode when the OS runs outof process descriptors, so it’s useful to ensure that enough processdescriptors are available upon supervisord startup.

Default: 200

Required: No.

Introduced: 3.0

nocleanup

Prevent supervisord from clearing any existing AUTOchild log files at startup time. Useful for debugging.

Default: false

Required: No.

Introduced: 3.0

childlogdir

The directory used for AUTO child log files. This option caninclude the value %(here)s, which expands to the directory inwhich the supervisord configuration file was found.

Default: value of Python’s tempfile.get_tempdir()

Required: No.

Introduced: 3.0

user

Instruct supervisord to switch users to this UNIX useraccount before doing any meaningful processing. The user can onlybe switched if supervisord is started as the root user.

Default: do not switch users

Required: No.

Introduced: 3.0

Changed: 3.3.4. If supervisord can’t switch to thespecified user, it will write an error message to stderr andthen exit immediately. In earlier versions, it would continue torun but would log a message at the critical level.

directory

When supervisord daemonizes, switch to this directory.This option can include the value %(here)s, which expands to thedirectory in which the supervisord configuration file wasfound.

Default: do not cd

Required: No.

Introduced: 3.0

strip_ansi

Strip all ANSI escape sequences from child log files.

Default: false

Required: No.

Introduced: 3.0

environment

A list of key/value pairs in the form KEY="val",KEY2="val2" thatwill be placed in the supervisord process’ environment(and as a result in all of its child process’ environments). Thisoption can include the value %(here)s, which expands to thedirectory in which the supervisord configuration file was found.Values containing non-alphanumeric characters should be quoted(e.g. KEY="val:123",KEY2="val,456"). Otherwise, quoting thevalues is optional but recommended. To escape percent characters,simply use two. (e.g. URI="/first%%20name") Note thatsubprocesses will inherit the environment variables of the shellused to start supervisord except for the ones overriddenhere and within the program’s environment option. SeeSubprocess Environment.

Default: no values

Required: No.

Introduced: 3.0

identifier

The identifier string for this supervisor process, used by the RPCinterface.

Default: supervisor

Required: No.

Introduced: 3.0

[supervisord] Section Example

  1. [supervisord]
  2. logfile = /tmp/supervisord.log
  3. logfile_maxbytes = 50MB
  4. logfile_backups=10
  5. loglevel = info
  6. pidfile = /tmp/supervisord.pid
  7. nodaemon = false
  8. minfds = 1024
  9. minprocs = 200
  10. umask = 022
  11. user = chrism
  12. identifier = supervisor
  13. directory = /tmp
  14. nocleanup = true
  15. childlogdir = /tmp
  16. strip_ansi = false
  17. environment = KEY1="value1",KEY2="value2"