简体   繁体   English

Rails:执行到期(和内存错误)

[英]Rails: Execution expired (and memory error)

Using: Rails 3.0.3 & Heroku & Execution Notifier & New Relic 使用:Rails 3.0.3&Heroku&执行通知程序&New Relic

I get a lot of execution expired all throughout my website. 我在整个网站上执行的所有工作都已过期。 I have recently realized that I have a part of the website that caused an infinite loop (and thus a memory error). 我最近意识到,我的网站中有一部分引起了无限循环(并因此导致了内存错误)。

Question #1: Is it very likely that, when this infinite loop occured, that it would affect the entire website making all others have to wait for it to stop/crash and thus causing them execution expired (which I believe is 30 sec at Heroku). 问题#1:当发生无限循环时,是否很有可能会影响整个网站,使所有其他网站不得不等待它停止/崩溃,从而导致它们的执行过期(我相信在Heroku中是30秒)。

Question #2: It seems like my website is quite slow. 问题2:我的网站似乎运行缓慢。 Can you recommend any service I can use to pinpoint what is actually taking time? 您能推荐我可以用来确定实际花费时间的任何服务吗? I have seen some graphical service before with columns on how much each part took to load (like image2 = 3 ms, this javascript = 3002 ms and so on). 我之前看到过一些图形服务,其中包含有关每个部分要加载多少的列(例如image2 = 3 ms,此javascript = 3002 ms,依此类推)。 How else can I troubleshoot or handle Execution Expired errors (referrals to good guides etc is appreciated). 我还可以如何解决或处理执行过期的错误(建议参考良好的指南等)。

1) likely depends on how many dynos you have, but if it's a common issue then they could potentially all be locked up simultaneously. 1)可能取决于您拥有的测功机,但是如果这是一个普遍的问题,那么它们可能同时被锁定。

2) New Relic is excellent. 2)新遗物非常出色。 It'll let you pinpoint slow actions, drill in and inspect queries, etc. 它可以让您查明慢速操作,深入并检查查询等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM