【问题标题】:"Internal Server Error" on Heroku in Django/Mezzanine appDjango/Mezzanine 应用程序中 Heroku 上的“内部服务器错误”
【发布时间】:2015-03-11 03:54:58
【问题描述】:

我正在 heroku 上部署我的 Mezzanine 应用程序,我想我终于完成了大部分设置。

但现在,我的应用程序的每个页面都会出现内部服务器错误,并且根本没有任何日志提及任何类似错误的内容。本地也有同样的错误。

来自命令“heroku logs”的日志如下所示:

2014-09-03T07:07:52.555930+00:00 heroku[web.1]: Starting process with command `g
unicorn wsgi -b 0.0.0.0:30978 -w 1`
2014-09-03T07:07:53.900072+00:00 heroku[web.1]: State changed from starting to u
p
2014-09-03T07:08:27.706884+00:00 heroku[router]: at=info method=GET path="/" hos
t=sheplusplus.herokuapp.com request_id=70b72520-1094-4ed7-83d7-ff44277c603b fwd=
"98.234.178.149" dyno=web.1 connect=2ms service=5ms status=500 bytes=713
2014-09-03T07:08:29.832027+00:00 heroku[router]: at=info method=GET path="/" hos
t=sheplusplus.herokuapp.com request_id=5a32f20e-5244-4f15-9e4b-dadd6b0fcfbb fwd=
"98.234.178.149" dyno=web.1 connect=2ms service=3ms status=500 bytes=713
2014-09-03T07:08:31.720436+00:00 heroku[router]: at=info method=GET path="/" hos
t=sheplusplus.herokuapp.com request_id=9ed6536a-3bb3-4dd9-904c-b2b3f1db2827 fwd=
"98.234.178.149" dyno=web.1 connect=2ms service=3ms status=500 bytes=713

Papertrail 的日志如下所示:

Sep 03 00:07:48 sheplusplus heroku/web.1:  State changed from up to starting 
Sep 03 00:07:51 sheplusplus heroku/web.1:  Stopping all processes with SIGTERM 
Sep 03 00:07:52 sheplusplus heroku/web.1:  Process exited with status 0 
Sep 03 00:07:52 sheplusplus heroku/web.1:  Starting process with command `gunicorn wsgi -b 0.0.0.0:30978 -w 1` 
Sep 03 00:07:54 sheplusplus heroku/web.1:  State changed from starting to up 
Sep 03 00:08:28 sheplusplus heroku/router:  at=info method=GET path="/" host=sheplusplus.herokuapp.com request_id=70b72520-1094-4ed7-83d7-ff44277c603b fwd="98.234.178.149" dyno=web.1 connect=2ms service=5ms status=500 bytes=713 
Sep 03 00:08:30 sheplusplus heroku/router:  at=info method=GET path="/" host=sheplusplus.herokuapp.com request_id=5a32f20e-5244-4f15-9e4b-dadd6b0fcfbb fwd="98.234.178.149" dyno=web.1 connect=2ms service=3ms status=500 bytes=713 
Sep 03 00:08:31 sheplusplus heroku/router:  at=info method=GET path="/" host=sheplusplus.herokuapp.com request_id=9ed6536a-3bb3-4dd9-904c-b2b3f1db2827 fwd="98.234.178.149" dyno=web.1 connect=2ms service=3ms status=500 bytes=713 

我的 procfile 看起来像这样:

web: gunicorn wsgi -b 0.0.0.0:$PORT -w 1

我不知道如何开始解决这个问题,因为我认为没有任何问题。

【问题讨论】:

  • 您是否正确配置了应用程序?您是否缺少任何要求?
  • 配置的具体含义是什么?而且我没有看到任何缺失的要求,但我会再次检查。
  • @BurnhanKhalid 我已经检查过了,我没有看到任何缺失的要求。对于可能出现的问题还有其他想法吗?
  • 显然有一个语法错误,但所有 gunicorn 都会告诉我它在'('附近。

标签: django heroku mezzanine


【解决方案1】:

本地做:

python manage.py runserver

并在加载页面时观察输出。它应该以更清晰的消息显示错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-05
    • 1970-01-01
    • 2017-10-20
    相关资源
    最近更新 更多