简体   繁体   中英

phusion passenger mod_rails on apache hanging

I run Apache 2.2.3 with passenger 3.0.7 (on a prehistoric 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. The apps come up in production mode on webrick so no app-internal problem.

I checked permissions, all owned by the apache user.

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. 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. 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?

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. 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 would start fine, then Passenger would try to spawn an application and then nothing. No exceptions or anything, just endless loop of trying to spawn the application.

Adding config.ru to the application resolved the issue immediately! For Rails 2.3 it should look like this:

require "config/environment"

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

Works like a charm now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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