诊断 Rails 3 Heroku 缓慢

发布于 2024-11-30 17:27:27 字数 299 浏览 0 评论 0原文

我有一个在 Heroku 上运行的 Rails 3 应用程序。该应用程序通常非常快,但有时我会遇到应用程序似乎挂起 2 分钟以上才最终返回请求的页面的情况。

我安装了 New Relic 插件,似乎没有什么突出的地方。它似乎是零星的,并且似乎没有连接到特定的控制器/操作。

您建议我如何查明此问题的原因?

http://github.com/kyledecot/skateparks-web

I have a Rails 3 app that I am running on Heroku. The app is usually really fast but sometimes I'll get cases where the app seems to hang for upwards of 2 minutes before finally returning the requested page.

I have the New Relic addon installed and there doesn't seem to be anything sticking out at me. It seems to be kind of sporadic and doesn't seem to be connected to a particular controller/action.

How would you suggest I go about pinpointing the cause of this problem?

http://github.com/kyledecot/skateparks-web

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

Smile简单爱 2024-12-07 17:27:27

始终检查日志。当发生这种情况时,请立即检查您的日志。可以肯定的是,所有 SQL 查询都会被记录并计时,并且您可能希望将日志记录和计时添加到您自己的一些服务调用中。

Always check the logs. When it happens, immediately go check your logs. Pretty sure all SQL queries are logged and timed, and you might want to add logging and timing to some of your own service calls.

醉酒的小男人 2024-12-07 17:27:27

如果您升级到 New Relic 的 Pro 级别,您可以获得专门针对缓慢交易的详细跟踪信息。将您的交易跟踪阈值调大(1秒相当大) ),然后等待痕迹出现。您将看到单个请求性能的详细细分,包括 SQL 查询。

(全面披露:我为 New Relic 工作。)

If you upgrade to the Pro level of New Relic, you can get detailed traces specifically of your slow transactions. Turn up your Transaction Trace threshold to a large number (1s is pretty big), and wait for traces to show up. You'll see a detailed breakdown of the performance of an individual request, including SQL queries.

(Full disclosure: I work for New Relic.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文