当日志中没有错误消息时,如何诊断 Heroku 上的 500 错误? [英] How do you diagnose a 500 error on Heroku when there is no error message in the logs?

查看:15
本文介绍了当日志中没有错误消息时,如何诊断 Heroku 上的 500 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Heroku 上有一个 Rails 应用程序,它以随机间隔提供 500 个错误.网页将以纯文本形式显示内部服务器错误",而不是通常的我们很抱歉.出了点问题".页.当我刷新页面时,它工作正常.

I have a Rails app on Heroku that is serving 500 errors at random intervals. Web pages will display "Internal server error" in plain text, instead of the usual "We're sorry. Something went wrong." page. When I refresh the page, it works fine.

日志不会向我显示错误消息,只是

The logs don't show me an error message, just

» 14:20:34.107 2013-10-11 12:20:33.763690+00:00 heroku router - - at=info method=HEAD path=/ host=www.mydomain.com fwd="184.73.237.85/ec2-184-73-237-85.compute-1.amazonaws.com" dyno=web.1 connect=1ms service=63ms status=200 bytes=0
» 14:21:03.957 2013-10-11 12:21:03.561867+00:00 heroku router - - at=info method=GET path=/ host=www.mydomain.com fwd="50.112.95.211/ec2-50-112-95-211.us-west-2.compute.amazonaws.com" dyno=web.1 connect=0ms service=1ms status=500 bytes=21

支持人员告诉我查看 New Relic 中的请求队列,但 New Relic 只显示一个大红色标记,表示服务器已关闭(即使该站点在刷新后工作正常).

Support has told me to look at request queuing in New Relic, but New Relic only shows a big red mark saying the server is down (even though the site works fine when refreshed).

没有错误消息,我不知道如何诊断这个问题.

With no error messages, I'm at a loss for how to diagnose this issue.

推荐答案

在 Heroku 中,我使用 诊断错误LogEntries -- 它比 Heroku 日志更容易诊断错误.

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

我要做的是加载应用程序,然后在 LogEntries 面板中,转到实时(测试版)".这会显示出现的任何错误,并且通常非常具有解释性

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

可能有帮助的东西

这篇关于当日志中没有错误消息时,如何诊断 Heroku 上的 500 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆