繁体   English   中英

Django Heroku应用程序错误

[英]Django Heroku Application Error

我已经成功地成功设置了Django博客并部署到Heroku(david.ingledow.co.uk)。

从那以后,我擦除了计算机,并尝试重新设置开发环境并重新部署一些更改( https://github.com/dingledow/my_site2/pull/14

我的Django应用在Heroku上崩溃,并注销了以下内容:

2014-11-12T19:44:49+00:00 heroku[slug-compiler]: Slug compilation started
2014-11-12T19:46:57+00:00 heroku[slug-compiler]: Slug compilation finished
2014-11-12T19:46:57.630587+00:00 heroku[api]: Deploy d1df813 by david@ingledow.co.uk
2014-11-12T19:46:57.630587+00:00 heroku[api]: Release v42 created by david@ingledow.co.uk
2014-11-12T19:46:58.428931+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-12T19:47:12.421429+00:00 app[web.1]: !!!
2014-11-12T19:47:12.421455+00:00 app[web.1]: !!! WARNING: This command is deprecated.
2014-11-12T19:47:12.421456+00:00 app[web.1]: !!!
2014-11-12T19:47:12.421458+00:00 app[web.1]: !!!         You should now run your application with the WSGI interface
2014-11-12T19:47:12.421459+00:00 app[web.1]: !!!         installed with your project. Ex.:
2014-11-12T19:47:12.421461+00:00 app[web.1]: !!!
2014-11-12T19:47:12.421462+00:00 app[web.1]: !!!             gunicorn myproject.wsgi:application
2014-11-12T19:47:12.421463+00:00 app[web.1]: !!!
2014-11-12T19:47:12.421465+00:00 app[web.1]: !!!         See https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/gunicorn/
2014-11-12T19:47:12.421466+00:00 app[web.1]: !!!         for more info.
2014-11-12T19:47:12.421468+00:00 app[web.1]: !!!
2014-11-12T19:47:12.421469+00:00 app[web.1]:
2014-11-12T19:47:12.587684+00:00 app[web.1]: Traceback (most recent call last):
2014-11-12T19:47:12.587697+00:00 app[web.1]:   File "app/manage.py", line 10, in <module>
2014-11-12T19:47:12.587699+00:00 app[web.1]:     execute_from_command_line(sys.argv)
2014-11-12T19:47:12.587720+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
2014-11-12T19:47:12.587810+00:00 app[web.1]:     utility.execute()
2014-11-12T19:47:12.587832+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
2014-11-12T19:47:12.587906+00:00 app[web.1]:     self.fetch_command(subcommand).run_from_argv(self.argv)
2014-11-12T19:47:12.587919+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
2014-11-12T19:47:12.587983+00:00 app[web.1]:     self.execute(*args, **options.__dict__)
2014-11-12T19:47:12.588007+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
2014-11-12T19:47:12.588089+00:00 app[web.1]:     output = self.handle(*args, **options)
2014-11-12T19:47:12.588110+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/management/commands/run_gunicorn.py", line 113, in handle
2014-11-12T19:47:12.588148+00:00 app[web.1]:     DjangoApplicationCommand(options, admin_media_path).run()
2014-11-12T19:47:12.588166+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
2014-11-12T19:47:12.588209+00:00 app[web.1]:     super(Application, self).run()
2014-11-12T19:47:12.588226+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
2014-11-12T19:47:12.588253+00:00 app[web.1]:     Arbiter(self).run()
2014-11-12T19:47:12.588271+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 169, in run
2014-11-12T19:47:12.588311+00:00 app[web.1]:     self.manage_workers()
2014-11-12T19:47:12.588329+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
2014-11-12T19:47:12.588402+00:00 app[web.1]:     self.spawn_workers()
2014-11-12T19:47:12.588419+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 542, in spawn_workers
2014-11-12T19:47:12.588500+00:00 app[web.1]:     time.sleep(0.1 * random.random())
2014-11-12T19:47:12.588517+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 209, in handle_chld
2014-11-12T19:47:12.588559+00:00 app[web.1]:     self.reap_workers()
2014-11-12T19:47:12.588576+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 459, in reap_workers
2014-11-12T19:47:12.588646+00:00 app[web.1]:     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2014-11-12T19:47:12.588716+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2014-11-12T19:47:13.436332+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-12T19:47:13.437047+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-12T19:47:11.080940+00:00 heroku[web.1]: Starting process with command `python app/manage.py run_gunicorn -b "0.0.0.0:53845" -w 2`
2014-11-12T19:47:13.416038+00:00 heroku[web.1]: Process exited with status 1
2014-11-12T19:47:28.607828+00:00 app[web.1]: !!!
2014-11-12T19:47:28.607844+00:00 app[web.1]: !!! WARNING: This command is deprecated.
2014-11-12T19:47:28.607849+00:00 app[web.1]: !!!
2014-11-12T19:47:28.607851+00:00 app[web.1]: !!!         You should now run your application with the WSGI interface
2014-11-12T19:47:28.607853+00:00 app[web.1]: !!!         installed with your project. Ex.:
2014-11-12T19:47:28.607854+00:00 app[web.1]: !!!
2014-11-12T19:47:28.607856+00:00 app[web.1]: !!!             gunicorn myproject.wsgi:application
2014-11-12T19:47:28.607857+00:00 app[web.1]: !!!
2014-11-12T19:47:28.607859+00:00 app[web.1]: !!!         See https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/gunicorn/
2014-11-12T19:47:28.607861+00:00 app[web.1]: !!!         for more info.
2014-11-12T19:47:28.607862+00:00 app[web.1]: !!!
2014-11-12T19:47:28.607863+00:00 app[web.1]:
2014-11-12T19:47:29.618094+00:00 heroku[web.1]: State changed from starting to crashed

这是我尝试访问david.ingledow.co.uk时的日志:

2014-11-12T20:01:13.065879+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=david.ingledow.co.uk request_id=b7642f5d-36d4-45cc-8a88-fbf57095ef28 fwd="67.228.177.17" dyno= connect= service= status=503 bytes=

我真的不理解这些日志,所以如果有人可以指出正确的方向,我将不胜感激。

我已经尝试过heroku run python app/manage.py syncdbheroku run python app/manage.py migrate

我将其从Django 1.6.x更新到1.7.1,如果可能是问题所在?

谢谢

认为您应该阅读这可能有助于您发现错误。

https://devcenter.heroku.com/articles/error-codes

我将Procfile更改为:

web: cd app && gunicorn app.wsgi:application -b "0.0.0.0:$PORT" -w 2

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM