Question

Upgraded to Rails 2.3.2 and Passenger 2.2.4 on Ubuntu hardy slice at slicehost with Apache2

I'm getting this same above discussed error in my Apache error.log of system /var/logs/apache2/

[ pid=4249 file=ext/apache2/Hooks.cpp:638 time=2009-07-04
11:47:32.752 ]:
  No data received from the backend application (process 4383) within
45000 msec. Either the backend application is frozen, or your TimeOut
value of 45 seconds is too low. Please check whether your application
is frozen, or increase the value of the TimeOut configuration
directive.
*** Exception Errno::EPIPE in Passenger RequestHandler (Broken pipe)
(process 4391):
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/rack/request_handler.rb:93:in `write'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/rack/request_handler.rb:93:in `process_request'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_request_handler.rb:206:in `main_loop'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/railz/application_spawner.rb:376:in
`start_request_handler'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/railz/application_spawner.rb:334:in
`handle_spawn_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/utils.rb:182:in `safe_fork'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/railz/application_spawner.rb:332:in
`handle_spawn_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:351:in `__send__'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:351:in `main_loop'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:195:in `start_synchronously'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:162:in `start'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/railz/application_spawner.rb:213:in `start'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/spawn_manager.rb:261:in `spawn_rails_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/spawn_manager.rb:254:in `spawn_rails_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/spawn_manager.rb:153:in `spawn_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/spawn_manager.rb:286:in `handle_spawn_application'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:351:in `__send__'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:351:in `main_loop'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/
phusion_passenger/abstract_server.rb:195:in `start_synchronously'
        from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-
server:61
*** Exception Errno::EPIPE in Passenger RequestHandler (Broken pipe)
(process 4383):

and these too.

pid=4362 file=ext/apache2/Hooks.cpp:638 time=2009-07-04
11:55:19.251 ]:
  No data received from the backend application (process 4383) within
45000 msec. Either the backend application is frozen, or your TimeOut
value of 45 seconds is too low. Please check whether your application
is frozen, or increase the value of the TimeOut configuration
directive.
[ pid=4298 file=ext/apache2/Hooks.cpp:638 time=2009-07-04
11:55:19.255 ]:
  No data received from the backend application (process 4252) within
45000 msec. Either the backend application is frozen, or your TimeOut
value of 45 seconds is too low. Please check whether your application
is frozen, or increase the value of the TimeOut configuration
directive.
[Sat Jul 04 11:55:19 2009] [error] [client 86.96.226.13] Premature end
of script headers: 41, referer: http://domain.com/
[ pid=4373 file=ext/apache2/Hooks.cpp:638 time=2009-07-04
11:55:19.559 ]:

Its getting me mad and on the browser, sometimes its show and when refreshed, Application Error 500 shows up in frequent basis. any directions??

Was it helpful?

Solution

It looks like the bug you're having was merged into Passenger master but not yet released. You can try it out by checking Passenger out from the following repository:

http://github.com/FooBarWidget/passenger/tree/master

Once you've checked it out, you want to run:

./bin/passenger-install-apache2-module

for Apache Passenger, or:

./bin/passenger-install-nginx-module

for Nginx Passenger. Since this particular issue was addressed, it should work for you.

OTHER TIPS

I had this problem too and fixed it by upgrading from passenger-2.1.2 to passenger-2.2.15.

To be clear it's not a rails issue, it's a passenger bug.

Error log output:

[ pid=13571 file=Hooks.cpp:508 time=2010-04-28 17:46:16.878 ]:
  Backend process 22235 did not return a valid HTTP response. It returned no data.
*** Exception Errno::EPIPE in Passenger RequestHandler (Broken pipe) (process 22235):
    from /usr/lib/ruby/gems/1.8/gems/passenger-2.1.2/lib/phusion_passenger/rack/request_handler.rb:67:in `write'

I updated to Passenger version 2.2.7 though this error was still occurring. I found that updating TimeOut and KeepAliveTimeout in my Apache configuration seemed to fix the problem. (They changed from 1 and 2 to 10 and 20 respectively). Hope that helps someone!

I just ran into this one. It turned out to be a symptom of broken DNS on the server. I think its nameservers had gone offline due to Hurricane Sandy. So, if you meet this problem, check that your internet name resolution is working!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top