【发布时间】:2012-02-07 06:59:48
【问题描述】:
我正在尝试在 heroku 上将 gunicorn 与我的 django 应用程序一起使用。我按照这里的说明进行操作:http://devcenter.heroku.com/articles/django#using_a_different_wsgi_server。看来 gunicorn 正在运行,因为日志表明它。但是,我不喜欢在日志文件中看到我不理解的错误消息,并且在查看日志时,我看到了“错误 R12(退出超时)-> 进程未能在 SIGTERM 的 10 秒内退出”的行” 然后“使用 SIGKILL 停止进程”。我的应用程序似乎在预期的 URL 上运行良好,所以这不是紧急情况,但我只是好奇发生了什么。谢谢。
2012-01-10T20:56:36+00:00 heroku[web.1]: State changed from up to bouncing
2012-01-10T20:56:36+00:00 heroku[web.1]: State changed from bouncing to created
2012-01-10T20:56:36+00:00 heroku[web.1]: State changed from created to starting
2012-01-10T20:56:39+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-01-10T20:56:39+00:00 heroku[web.1]: Starting process with command `python blossom/manage.py run_gunicorn -b "0.0.0.0:27470" -w 3`
2012-01-10T20:56:40+00:00 app[web.1]: Validating models...
2012-01-10T20:56:40+00:00 app[web.1]: Django version 1.3.1, using settings 'blossom.settings'
2012-01-10T20:56:40+00:00 app[web.1]:
2012-01-10T20:56:40+00:00 app[web.1]: Server is running
2012-01-10T20:56:40+00:00 app[web.1]: 0 errors found
2012-01-10T20:56:40+00:00 app[web.1]: Quit the server with CONTROL-C.
2012-01-10T20:56:40+00:00 app[web.1]: 2012-01-10 15:56:40 [3] [INFO] Starting gunicorn 0.13.4
2012-01-10T20:56:40+00:00 app[web.1]: 2012-01-10 15:56:40 [3] [INFO] Listening at: http://0.0.0.0:27470 (3)
2012-01-10T20:56:40+00:00 app[web.1]: 2012-01-10 15:56:40 [3] [INFO] Using worker: sync
2012-01-10T20:56:40+00:00 app[web.1]: 2012-01-10 15:56:40 [6] [INFO] Booting worker with pid: 6
2012-01-10T20:56:40+00:00 app[web.1]: 2012-01-10 15:56:40 [7] [INFO] Booting worker with pid: 7
2012-01-10T20:56:40+00:00 app[web.1]: 2012-01-10 15:56:40 [8] [INFO] Booting worker with pid: 8
2012-01-10T20:56:41+00:00 heroku[web.1]: State changed from starting to up
2012-01-10T20:56:48+00:00 heroku[web.1]: Error R12 (Exit timeout) -> Process failed to exit within 10 seconds of SIGTERM
2012-01-10T20:56:48+00:00 heroku[web.1]: Stopping process with SIGKILL
2012-01-10T20:56:50+00:00 heroku[web.1]: Process exited
【问题讨论】: