它给出:内部服务器错误 当我尝试访问网站/管理员或任何其他应用程序时 尝试使用heroku部署我的应用。
这是来自heroku的日志:
文件“ /app/.heroku/python/lib/python3.6/site-packages/django/utils/functional.py”,第125行,位于__cast 2019-05-08T15:15:47.484058 + 00:00 app [web.1]:返回自己.__ text_cast()
2019-05-08T15:15:47.484060 + 00:00 app [web.1]:文件“ /app/.heroku/python/lib/python3.6/site-packages/django/utils/functional.py ”,位于__text_cast
中的第113行2019-05-08T15:15:47.484061 + 00:00 app [web.1]:返回func(* self .__ args,** self .__ kw)
2019-05-08T15:15:47.484063 + 00:00 app [web.1]:文件“ /app/.heroku/python/lib/python3.6/site-packages/django/urls/base.py “,第86行,反过来
2019-05-08T15:15:47.484064 + 00:00 app [web.1]:引发NoReverseMatch(“%s不是注册的名称空间”%键)
2019-05-08T15:15:47.484066 + 00:00 app [web.1]:django.urls.exceptions.NoReverseMatch:'promotions'不是注册的名称空间
2019-05-08T15:15:47.484067 + 00:00 app [web.1]:10.13.251.26--[08 / May / 2019:15:15:47 +0000]“ GET / admin / login / ?next = / admin / HTTP / 1.1“ 500 0”-“”-“
2019-05-08T15:17:06.098441 + 00:00 heroku [router]:at = info method = GET path =“ /” host = aapnik123.herokuapp.com request_id = 18244196-eaec-43ef-be28-bb4cbbdee0b0 fwd =“ 103.232.241.185” dyno = web.1 connect = 1ms service = 17ms status = 200 bytes = 7368 protocol = https
2019-05-08T15:17:06.098037 + 00:00 app [web.1]:10.63.174.177--[08 / May / 2019:15:17:06 +0000]“ GET / HTTP / 1.1” 200 6967“ https://dashboard.heroku.com/”“ Mozilla / 5.0(X11; Linux x86_64)AppleWebKit / 537.36(KHTML,例如Gecko)Chrome / 74.0.3729.131 Safari / 537.36”
2019-05-08T15:19:19.758608 + 00:00 heroku [router]:at = info method = GET path =“ / admin /” host = aapnik123.herokuapp.com request_id = 17fea225-3ad5-4ec5-b817 -e941818ea8d7 fwd =“ 103.232.241.185” dyno = web.1 connect = 0ms service = 3ms status = 302 bytes = 346 protocol = https
2019-05-08T15:19:19.759552 + 00:00 app [web.1]:10.123.204.200--[08 / May / 2019:15:19:19 +0000]“ GET / admin / HTTP / 1.1“ 302 0”-“” Mozilla / 5.0(X11; Linux x86_64)AppleWebKit / 537.36(KHTML,例如Gecko)Chrome / 74.0.3729.131 Safari / 537.36“
我尝试设置允许的主机=“ *”。
这是我在主应用中的url.py 我尝试使用namepsace解决 NoReverseMatch 错误,但无法正常工作。
SomersDelta(as.matrix(sommer), direction = c("row", "column"))
#[1] -0.06137931
答案 0 :(得分:0)
它与我在settings.py中设置的hystrix:
command:
your-service-name:
execution:
isolation:
strategy: THREAD
thread:
timeoutInMilliseconds: 95000
your-service-name:
ribbon:
ConnectTimeout: 30000
ReadTimeout: 60000
MaxTotalHttpConnections: 500
MaxConnectionsPerHost: 100
一起使用
答案 1 :(得分:0)
问题已解决。原来我没有在heroku上建立数据库,只是在本地建立的。 因此它在本地运行,但在生产模式下失败。