简体   繁体   English

phusion乘客mod_rails在apache上

[英]phusion passenger mod_rails on apache hanging

I run Apache 2.2.3 with passenger 3.0.7 (on a prehistoric SLES11 linux). 我在旅客3.0.7上运行Apache 2.2.3(在史前SLES11 linux上)。 when a request goes through passenger, it spawns the app process but then hangs forever as if no app could start up. 当请求通过乘客时,它会生成应用程序流程,但会永远挂起,好像没有应用程序可以启动一样。

I tested with trivial hello world rack app, as well as a freshly created rails 3 app skeleton. 我使用了普通的hello world rack应用程序以及新创建的Rails 3应用程序框架进行了测试。 The apps come up in production mode on webrick so no app-internal problem. 应用程序在webrick上以生产模式启动,因此没有应用程序内部问题。

I checked permissions, all owned by the apache user. 我检查了权限,所有权限均由apache用户拥有。

Passenger logs to apache that it spawned the process but the request url does not even make it to the access log of apache and the app logs are empty too. 乘客记录到apache生成了该进程,但是请求url甚至没有进入apache的访问日志,并且应用程序日志也为空。 Passenger people say that the trace shows as if the apps froze during startup, however I find no trace of them even reaching config.ru. 乘客们说,跟踪显示出好像应用程序在启动期间冻结了,但是我什至找不到config.ru都找不到它们。 This all suggests to me that it is passengers spawner that hangs. 这一切都向我暗示了是悬挂的旅客产卵器。

This is all too mysterious, can it not be that the spawned process does not get resources due to some wierd apache config? 这太神秘了,难道不是由于一些奇怪的apache配置而导致生成的进程没有获得资源吗?

Does this ring a bell to anyone? 这会给任何人敲响钟声吗? all help or hints to debug appreciated 所有帮助或调试提示表示赞赏

I raised this problem on the phusion google group but found no resolution. 我在Phusion Google网上论坛上提出了这个问题,但没有找到解决方法。 https://groups.google.com/forum/#!topic/phusion-passenger/GlQIBNTyF6A https://groups.google.com/forum/#!topic/phusion-passenger/GlQIBNTyF6A

Vik 维克

I had the same problem with Nginx 1.0.15, Passenger 3.0.12, Rails 2.3.14 and Bundler 1.1.3. 我在Nginx 1.0.15,Passenger 3.0.12,Rails 2.3.14和Bundler 1.1.3中遇到了相同的问题。 Nginx would start fine, then Passenger would try to spawn an application and then nothing. Nginx可以正常运行,然后Passenger会尝试生成一个应用程序,然后什么也不做。 No exceptions or anything, just endless loop of trying to spawn the application. 没有异常或任何东西,只是试图生成应用程序的无尽循环。

Adding config.ru to the application resolved the issue immediately! 将config.ru添加到应用程序可立即解决该问题! For Rails 2.3 it should look like this: 对于Rails 2.3,它应如下所示:

require "config/environment"

use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new

Works like a charm now. 现在就像魅力一样。

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

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