我成功设置了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 syncdb
和heroku run python app/manage.py migrate
。
如果可能是问题,我已经将它从Django 1.6.x更新到1.7.1了吗?
由于
答案 0 :(得分:0)
认为你应该阅读它可能有助于你找出错误。
答案 1 :(得分:0)
我将Procfile更改为:
web: cd app && gunicorn app.wsgi:application -b "0.0.0.0:$PORT" -w 2