Das Gunicorn, das ich mit dem Supervisor verwalte, wird automatisch beendet. Dies ist das Flask-Projekt, das ich mit Python3.Hope erstellt habe, um Ihre Hilfe zu bekommen. Start-Befehl ist:Warum verwende ich Supervisor Managed Gunicorn automatisch beendet?
sudo supervisord -c /etc/supervisor/conf.d/app.conf
log:
[2017-10-24 08:41:15 +0000] [10357] [INFO] Starting gunicorn 19.7.1
[2017-10-24 08:41:15 +0000] [10357] [INFO] Listening at: http://0.0.0.0:8000 (10357)
[2017-10-24 08:41:15 +0000] [10357] [INFO] Using worker: sync
[2017-10-24 08:41:15 +0000] [10360] [INFO] Booting worker with pid: 10360
[2017-10-24 08:41:16 +0000] [10362] [INFO] Booting worker with pid: 10362
[2017-10-24 08:41:16 +0000] [10364] [INFO] Booting worker with pid: 10364
[2017-10-24 08:41:16 +0000] [10366] [INFO] Booting worker with pid: 10366
[2017-10-24 08:41:54 +0000] [10357] [INFO] Handling signal: term
[2017-10-24 08:41:54 +0000] [10360] [INFO] Worker exiting (pid: 10360)
[2017-10-24 08:41:54 +0000] [10362] [INFO] Worker exiting (pid: 10362)
[2017-10-24 08:41:54 +0000] [10366] [INFO] Worker exiting (pid: 10366)
[2017-10-24 08:41:54 +0000] [10364] [INFO] Worker exiting (pid: 10364)
[2017-10-24 08:41:54 +0000] [10357] [INFO] Shutting down: Master
Supervisor config:
[program:app]
directory = /home/ubuntu/Flask-Blog/
command = /home/ubuntu/Flask-Blog/venv/bin/gunicorn -w4 -b0.0.0.0:8000 manage:app
autostart = true
startsecs = 5
autorestart = true
startretries = 3
user = ubuntu
redirect_stderr = true
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 20
stdout_logfile = /home/ubuntu/Flask-Blog/log/gunicorn.log
stder_logfile = /home/ubuntu/Flask-Blog/log/gunicorn.err
stopasgroup = false
killasgroup = false
[supervisorctl]
[supervisord]
[inet_http_server]
port = 127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
Doppelte Route Endpunkte/Logikfehler verlassen können, damit dies geschieht. Führen Sie Ihre App ohne Gunicorn und bestätigen Sie, dass App diesen Fehler nicht erzeugt –
Ich habe Gunicorn mit dem gleichen Befehl gestartet, aber das ist nicht geschehen. –
Ich meinte die flash app ohne gunicorn laufen. Sehen Sie dies: http://flask.pooco.org/docs/0.12/quickstart/#debug-mode –