title: Supervisor + celery : entered FATAL state, too many start retries too quickly
body: <p>I am using celery to handle async tasks of my django application and using supervisor to handle celery.</p>
  
  <p>But when i am trying to run it via supervisor, I get below logs on restarting</p>
  
  <pre><code>$ sudo tail -f /var/log/supervisor/supervisord.log
  2019-07-04 13:08:19,298 CRIT received SIGTERM indicating exit request
  2019-07-04 13:08:19,436 CRIT Supervisor running as root (no user in config file)
  2019-07-04 13:08:19,441 INFO /var/tmp/supervisor.sock:Medusa (V1.1.1.1) started at Thu Jul  4 13:08:19 2019
          Hostname: &lt;unix domain socket&gt;
          Port:/var/tmp/supervisor.sock
  2019-07-04 13:08:19,465 CRIT Running without any HTTP authentication checking
  2019-07-04 13:08:19,466 DEBG supervisord forked; parent exiting
  2019-07-04 13:08:19,466 INFO daemonizing the process
  2019-07-04 13:08:19,466 INFO supervisord started with pid 21246
  2019-07-04 13:08:19,467 INFO spawned: 'celery ' with pid 21248
  2019-07-04 13:08:19,782 INFO exited: celery (exit status 1; not expected)
  2019-07-04 13:08:19,783 INFO received SIGCLD indicating a child quit
  2019-07-04 13:08:20,785 INFO spawned: 'celery ' with pid 21253
  2019-07-04 13:08:21,066 INFO exited: celery (exit status 1; not expected)
  2019-07-04 13:08:21,066 INFO received SIGCLD indicating a child quit
  2019-07-04 13:08:23,070 INFO spawned: 'celery ' with pid 21260
  2019-07-04 13:08:23,355 INFO exited: celery (exit status 1; not expected)
  2019-07-04 13:08:23,355 INFO received SIGCLD indicating a child quit
  2019-07-04 13:08:26,360 INFO spawned: 'celery ' with pid 21265
  2019-07-04 13:08:26,638 INFO exited: celery (exit status 1; not expected)
  2019-07-04 13:08:26,638 INFO received SIGCLD indicating a child quit
  2019-07-04 13:08:27,639 INFO gave up: celery entered FATAL state, too many start retries too quickly
  </code></pre>
  
  <p>Our config file</p>
  
  <pre><code>$ cat /etc/supervisord.conf
  [supervisord]
  http_port=/var/tmp/supervisor.sock ; (default is to run a UNIX domain socket server)
  ;http_port=127.0.0.1:9001  ; (alternately, ip_address:port specifies AF_INET)
  ;sockchmod=0700              ; AF_UNIX socketmode (AF_INET ignore, default 0700)
  ;sockchown=nobody.nogroup     ; AF_UNIX socket uid.gid owner (AF_INET ignores)
  ;umask=022                   ; (process file creation umask;default 022)
  logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
  logfile_maxbytes=50MB       ; (max main logfile bytes b4 rotation;default 50MB)
  logfile_backups=10          ; (num of main logfile rotation backups;default 10)
  loglevel=debug               ; (logging level;default info; others: debug,warn)
  pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
  nodaemon=false              ; (start in foreground if true;default false)
  minfds=1024                 ; (min. avail startup file descriptors;default 1024)
  minprocs=200                ; (min. avail process descriptors;default 200)
  
  [supervisorctl]
  serverurl=unix:///var/tmp/supervisor.sock ; use a unix:// URL  for a unix socket
  ;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
  ;username=chris              ; should be same as http_username if set
  ;password=123                ; should be same as http_password if set
  ;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
  
  [program:celery]
  command=sudo celery -A myapp worker -l info --autoscale=3,2 --maxtasksperchild=1000
  directory=/home/&lt;user&gt;/myapp
  numprocs=1
  stdout_logfile=/var/log/celery.log
  stderr_logfile=/var/log/celery.log
  autostart=true
  autorestart=true
  startsecs=100
  startretries=3
  user=root
  </code></pre>
  
  <p>If I run below command directly in terminal, it work fine. Infact thats how it is running right now in <code>screen</code> .</p>
  
  <pre><code>sudo celery -A myapp worker -l info --autoscale=3,2 --maxtasksperchild=1000
  </code></pre>
  
  <p>But same command in supervisord is giving above mentioned error.</p>
  
  <p>Can someone please help?</p>