Defect #8315

Unexplained breakage

Added by Scot Wilcoxon about 11 years ago. Updated about 11 years ago.

Status:ClosedStart date:2011-05-06
Priority:HighDue date:
Assignee:-% Done:


Target version:-
Resolution:Invalid Affected version:


Is Redmine supposed to report its problems someplace?

I inherited a Redmine server, and it recently quit working. The error doesn't hint at any configuration file or what might have broken. The files all seem to be lib files which are unlikely to have been altered during installation, much less something which broke without being touched.

I found mention that "Shifting failed" might be related to log files, but I don't see any log configuration in environment.rb. I tried adding a log limit definition, but the error remains.

Error during failsafe response: Shifting failed. closed stream
[ pid=10657 thr=-609445668 file=utils.rb:176 time=2011-05-06 12:43:06.915 ]: *** Exception NoMethodError in application (undefined method `each' for nil:NilClass) (process 10657, thread #<Thread:0xb75931b8>):
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/rack/request_handler.rb:106:in `process_request'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/utils.rb:479:in `safe_fork'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:180:in `start'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/helper-scripts/passenger-spawn-server:99
[ pid=5176 thr=3066758944 file=ext/apache2/Hooks.cpp:820 time=2011-05-06 12:43:06.940 ]: The backend application (process 10657) did not send a valid HTTP response; instead, it sent nothing at all. It is possible that it has crashed; please check whether there are crashing bugs in this application.


#1 Updated by James Byrne about 11 years ago

This does not appear to be a Redmine problem but a Phusion Passenger (Rails module for Apache) difficulty. I would try their support list on google groups first ( Their primary web site is:

#2 Updated by Scot Wilcoxon about 11 years ago

The problem went away after I updated Redmine. I hope the new version is more robust and has better error reporting.

#3 Updated by Andreas Bosch about 11 years ago

I had the same problem here. It seems to be related to the log rotation which may be configured in "[REDMINE_DIR]/config/additional_environment.rb":

config.logger =, 2, 1000000)

I had the idea because this was the only change that had been made for the past few weeks. When I saw that a new log file had been created at the time the error occurred, I was quite sure that this is the problem.

After some googling I found out that the reason is most probably that the new log file is still locked by a process and may not be accessed by Redmine/Ruby/whatever. In my case, I have three Mongrel services running. Now, if one of these services creates the new log file, the other two may not be allowed to access it for some reason/bug. This assumption was confirmed when I stopped two Mongrel services because the problem no longer occurred.

However, I have now removed the log rotation from my configuration and everything works fine again. I do not know if there is a better solution for this problem.

#4 Updated by Etienne Massip about 11 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

It may be a Rails issue, but definitively not a Redmine one.

Using logrotate under Unix is the preferred way to solve it, according to the web (

Also available in: Atom PDF