How do you diagnose a 500 error on Heroku when there is no error message in the logs?

北城余情 提交于 2019-11-28 09:40:26

In Heroku, I diagnose errors with LogEntries -- its far easier than the Heroku logs to diagnose errors.

What I do is load up the app, and in the LogEntries panel, go to "Live (Beta)". This shows any errors which appear, and are generally very explanatory

Just something that might help

LMo

Try adding the rails_12factor gem to get a more robust error log ( only if you're using Heroku ).

Make sure you rake db:migrate your database on Heroku with heroku run rake db:migrate

The solution that worked for me when deploying my Django apps to Heroku is to go into the production.py file and change the code DEBUG = FALSE to DEBUG = TRUE. In this way, you should be able to see the errors that Django displays. Be aware that once you have found the error and have done the corrections, this setting must be changed back to FALSE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!