Passenger routing error (Redmine issue)

software development

#1

I’ve been trying to track this problem off and on for a couple of years. We thought that by upgrading to Deb 6.0.4 this might solve our problem.

Problem: Sometimes when creating or updating an issue in Redmine, we get a 404 returned. But upon reloading, the issue displays in the client (i.e. browser).

Context:

Debian 6.0.4
Apache 2.2.17
Passenger 2.2.9
Redmine 1.2-stable

Process:

I’ve looked into the apache and the ruby logs. Here is what apache shows me:

[ pid=6188 file=ext/apache2/Hooks.cpp:727 time=2012-04-30 02:49:33.113 ]:
Unexpected error in mod_passenger: Could not send data to the ApplicationPool server: write() failed: Bad file descriptor (9)
Backtrace:
in 'virtual boost::shared_ptr<Passenger::Application::Session> Passenger::ApplicationPoolServer::Client::get(const Passenger::PoolOptions&)' (ApplicationPoolServer.h:402)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:523)

And here is what the ruby log shows me:

[code]
Processing IssuesController#update (for 216.6.236.171 at 2012-04-30 19:55:48) [PUT]
Parameters: {“time_entry”=>{“comments”=>"", “activity_id”=>"", “hours”=>""}, “commit”=>“Submit”, “notes”=>“Support ticket filed with DH: 4992318”, “action”=>“update”, “_method”=>“put”, “authenticity_token”
=>“0Iygaa3ThPRstK7O6O3torv46n/0l+mxpcarSx94CO8=”, “id”=>“608”, “issue”=>{“start_date”=>“2012-04-30”, “estimated_hours”=>"", “parent_issue_id”=>"", “priority_id”=>“4”, “is_private”=>“0”, “lock_version”=>“5”,
“fixed_version_id”=>"", “assigned_to_id”=>"", “subject”=>“Redmine failing”, “tracker_id”=>“1”, “due_date”=>"", “status_id”=>“1”, “description”=>“I’m trying to use this bug to replicate Redmine failing. Here
are the relevant comments that I’ve given the DH staff:\r\n\r\n>> We’ve done that and we’re still seeing these failures. They look\r\n>> like this:\r\n>>\r\n>> [ pid=5767 file=ext/apache2/Hooks.cpp:727 time=
2011-10-09\r\n>> 07:53:38.591 ]:\r\n>> Unexpected error in mod_passenger: Could not send data to the\r\n>> ApplicationPool server: write() failed: Bad file descriptor (9)\r\n>> Backtrace:\r\n>> in ‘virtual b
oost::shared_ptrPassenger::Application::Session\r\n>> Passenger::ApplicationPoolServer::Client::get(const\r\n>> Passenger::PoolOptions&)’\r\n>> (ApplicationPoolServer.h:402)\r\n>> in ‘int Hooks::handleRequ
est(request_rec*)’ (Hooks.cpp:523)\r\n>>\r\n>> See /usr/local/dh/apache2/logs/apache2-ps15318/error.log.1 for more\r\n>> details\r\n>> (grep for Passenger).”}, “controller”=>“issues”, “attachments”=>{“1”=>{“
description”=>""}}}
Sending email notification to: alvin@ootbdev.com, avery@ootbdev.com
Redirected to https://dradis.ootbdev.com/issues/608
Completed in 556ms (DB: 207) | 302 Found [dradis.ootbdev.com/issues/608]

Processing ApplicationController#index (for 216.6.236.171 at 2012-04-30 19:55:49) [GET]

ActionController::RoutingError (No route matches “/internal_error.html” with {:method=>:get}):
/dh/passenger/lib/phusion_passenger/rack/request_handler.rb:92:in process_request' /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:207:inmain_loop’
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:400:in start_request_handler' /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:351:inhandle_spawn_application’
/dh/passenger/lib/phusion_passenger/utils.rb:184:in safe_fork' /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:349:inhandle_spawn_application’
/dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in __send__' /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:inmain_loop’
/dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in start_synchronously' /dh/passenger/lib/phusion_passenger/abstract_server.rb:163:instart’
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:209:in start' /dh/passenger/lib/phusion_passenger/spawn_manager.rb:262:inspawn_rails_application’
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:126:in lookup_or_add' /dh/passenger/lib/phusion_passenger/spawn_manager.rb:256:inspawn_rails_application’
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:80:in synchronize' /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize’
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:255:in spawn_rails_application' /dh/passenger/lib/phusion_passenger/spawn_manager.rb:154:inspawn_application’
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:287:in handle_spawn_application' /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:insend
/dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in main_loop' /dh/passenger/lib/phusion_passenger/abstract_server.rb:196:instart_synchronously’

Rendering /home/ootbdv/dradis/dradis.ootbdev.com/public/404.html (404 Not Found)[/code]

Has anyone run into this problem before? A quick perusal of the forum seems to indicate that Redmine doesn’t really play well with the VPS (which we’re on) that DH offers. This doesn’t seem to be a memory issue (judging from the log output).


#2

Same error here.

I found that it’s a DH problem:
http://www.redmine.org/boards/2/topics/24487

But don’t know how to solve it.


#3

Thanks. This has stymied me for a while. It looks like turning off mod_security might help (see the end of the link you posted).

There’s also this hack:

http://www.cnblogs.com/walzer/archive/2011/07/10/2102435.html

Will DH ever fix this?