我的 Mac 上安装了 Bitnami Rails 堆栈。为了更好地解释我的问题,我创建了一个以 mysql 作为后端的简单的基于脚手架的 rails 应用程序。我可以在一段时间内执行简单的 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]
它只是挂在这一点上。发生这种情况后,我必须重新启动服务器,以便在几次请求后再次挂起。这是我遇到的最奇怪的问题,我真的很难过。