Rails 应用程序在几次请求后挂起

发布于 2024-08-27 07:09:57 字数 1646 浏览 9 评论 0原文

我的 Mac 上安装了 Bitnami Rails 堆栈。为了更好地解释我的问题,我创建了一个简单的基于脚手架的 Rails 应用程序,并以 mysql 作为后端。我可以暂时执行简单的 POST 和 GET 请求,但在几次请求之后,应用程序就会无限期挂起。没有捕获任何异常,也没有在开发日志中报告这种奇怪的行为。这是应用程序冻结之前开发日志的最后一点:

Processing WritedatasController#index (for 127.0.0.1 at 2010-03-30 20:38:51) [GET]
   [4;36;1mWritedata Load (0.7ms) [0m    [0;1mSELECT * FROM `writedatas`  [0m
Rendering template within layouts/application
Rendering writedatas/index
   [4;35;1mWritedata Columns (2.9ms) [0m    [0mSHOW FIELDS FROM `writedatas` [0m
Completed in 99ms (View: 88, DB: 4) | 200 OK [http://localhost/writedatas]
   [4;36;1mSQL (0.2ms) [0m    [0;1mSET NAMES 'utf8' [0m
   [4;35;1mSQL (0.1ms) [0m    [0mSET SQL_AUTO_IS_NULL=0 [0m


Processing WritedatasController#new (for 127.0.0.1 at 2010-03-30 20:38:52) [GET]
   [4;36;1mWritedata Columns (2.0ms) [0m    [0;1mSHOW FIELDS FROM `writedatas` [0m
Rendering template within layouts/application
Rendering writedatas/new
Rendered writedatas/_form (5.9ms)
Completed in 34ms (View: 25, DB: 2) | 200 OK [http://localhost/writedatas/new]
   [4;36;1mSQL (0.4ms) [0m    [0;1mSET NAMES 'utf8' [0m
   [4;35;1mSQL (0.1ms) [0m    [0mSET SQL_AUTO_IS_NULL=0 [0m


Processing WritedatasController#index (for 127.0.0.1 at 2010-03-30 20:39:17) [GET]
   [4;36;1mWritedata Load (0.7ms) [0m    [0;1mSELECT * FROM `writedatas`  [0m
Rendering template within layouts/application
Rendering writedatas/index
   [4;35;1mWritedata Columns (2.6ms) [0m    [0mSHOW FIELDS FROM `writedatas` [0m
Completed in 101ms (View: 90, DB: 4) | 200 OK [http://localhost/writedatas]

它此时刚刚挂起。发生这种情况后,我必须重新启动服务器,因为它会在几次请求后再次挂起。这是我遇到过的最奇怪的问题,我真的很难过。

I have Bitnami Rails stack installed on my Mac. To better explain my problem i created a simple scaffold based rails app with mysql as the backend. I can get to perform simple POST and GET requests for a while and after a few requests the app just hangs indefinitely. No exception caught or anything worthwhile in the development log to report this strange behavior. This is the last bit from the development log before the app froze:

Processing WritedatasController#index (for 127.0.0.1 at 2010-03-30 20:38:51) [GET]
   [4;36;1mWritedata Load (0.7ms) [0m    [0;1mSELECT * FROM `writedatas`  [0m
Rendering template within layouts/application
Rendering writedatas/index
   [4;35;1mWritedata Columns (2.9ms) [0m    [0mSHOW FIELDS FROM `writedatas` [0m
Completed in 99ms (View: 88, DB: 4) | 200 OK [http://localhost/writedatas]
   [4;36;1mSQL (0.2ms) [0m    [0;1mSET NAMES 'utf8' [0m
   [4;35;1mSQL (0.1ms) [0m    [0mSET SQL_AUTO_IS_NULL=0 [0m


Processing WritedatasController#new (for 127.0.0.1 at 2010-03-30 20:38:52) [GET]
   [4;36;1mWritedata Columns (2.0ms) [0m    [0;1mSHOW FIELDS FROM `writedatas` [0m
Rendering template within layouts/application
Rendering writedatas/new
Rendered writedatas/_form (5.9ms)
Completed in 34ms (View: 25, DB: 2) | 200 OK [http://localhost/writedatas/new]
   [4;36;1mSQL (0.4ms) [0m    [0;1mSET NAMES 'utf8' [0m
   [4;35;1mSQL (0.1ms) [0m    [0mSET SQL_AUTO_IS_NULL=0 [0m


Processing WritedatasController#index (for 127.0.0.1 at 2010-03-30 20:39:17) [GET]
   [4;36;1mWritedata Load (0.7ms) [0m    [0;1mSELECT * FROM `writedatas`  [0m
Rendering template within layouts/application
Rendering writedatas/index
   [4;35;1mWritedata Columns (2.6ms) [0m    [0mSHOW FIELDS FROM `writedatas` [0m
Completed in 101ms (View: 90, DB: 4) | 200 OK [http://localhost/writedatas]

It just hung at this point. And after this happens i have to restart the server, for it to hang again after few requests. This is the weirdest problem i have faced and i am truly stumped.

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

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

发布评论

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

评论(1

擦肩而过的背影 2024-09-03 07:09:57

您提供的信息不足以让我们发表评论。
在调试器模式下运行服务器并尝试通过单步执行代码来查明问题。

如果代码没有任何问题,请尝试使用一组干净的数据运行它。

You don't provide enough for us to comment.
Run the server in debugger mode and try to pinpoint the problem by stepping through the code.

If there's nothing wrong with the code, try running it with a clean set of data.

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