Django Supervisor FATAl Out too fast, how can I improve?
I am using supervisor in django, my supervisor got an error. my server is on Ubuntu 16.04.2 x64 i use, nginx, gunicortn, supervisor, postgresql.
FATAl Exited too quickly (process log may have details)
...If you have any ideas how to fix this please let me know your thoughts
This is my dispatcher file.
[program:chart_app]
command = /webapps/chart_app/bin/gunicorn_start
user = chart
stdout_logfile = /webapps/chart_app/logs/gunicorn_supervisor.log
redirect_stderr = true
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8
error in logs
> supervisor: couldn't exec /webapps/chart_app/bin/gunicorn_start:
> ENOEXEC supervisor: child process was not spawned supervisor: couldn't
> exec /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned supervisor: couldn't exec
> /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned supervisor: couldn't exec
> /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned supervisor: couldn't exec
> /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned supervisor: couldn't exec
> /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned supervisor: couldn't exec
> /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned supervisor: couldn't exec
> /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child
> process was not spawned
gunicrotn_start
#!/bin/bash
NAME="chart_app" # Name of the application
DJANGODIR=/webapps/chart_app/src # Django project directory
SOCKFILE=/webapps/chart_app/run/gunicorn.sock # we will communicte using this unix socket
USER=chart # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=src.settings # which settings file should Django use
DJANGO_WSGI_MODULE=src.wsgi # WSGI module name
echo "Starting $NAME as `whoami`"
# Activate the virtual environment
cd $DJANGODIR
source ../bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH
# Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR
# Start your Django Unicorn
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--workers $NUM_WORKERS \
--user=$USER --group=$GROUP \
--bind=unix:$SOCKFILE \
--log-level=debug \
--log-file=-
+3
source to share
No one has answered this question yet