Can't figure out what's causing 500 Internal Server Error
I am getting seemingly random 500 Internal Server Error responses from Apache on our newly launched Rails 3.1 site. The error follows:
开发者_运维知识库[ pid=19441 thr=2888301424 file=ext/apache2/Hooks.cpp:822 time=2011-09-15 15:45:07.311 ]: The backend application (process 19550) 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.
Sometimes I'm also seeing the following error:
[ pid=5805 thr=75783560 file=utils.rb:176 time=2011-09-15 16:02:19.471 ]: * Exception PGError in application (SSL SYSCALL error: EOF detected ) (process 5805, thread #): from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:276:in
exec' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:276:in
block in clear_cache!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:275:ineach_value' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:275:in
clear_cache!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:303:indisconnect!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:202:in
block in disconnect!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:ineach' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in
disconnect!' from /app/oath/vendor/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/module/synchronization.rb:35:inblock in disconnect_with_synchronization!' from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in
mon_synchronize' from /app/oath/vendor/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/module/synchronization.rb:34:indisconnect_with_synchronization!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:395:in
block in clear_all_connections!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:395:ineach_value' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:395:in
clear_all_connections!' from /app/oath/vendor/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:inclear_all_connections!' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/utils.rb:398:in
before_handling_requests' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb:204:instart_request_handler' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb:170:in
block in handle_spawn_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/utils.rb:479:insafe_fork' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb:165:in
handle_spawn_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb:206:in
start_synchronously' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb:180:instart' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/rack/application_spawner.rb:128:in
start' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb:253:inblock (2 levels) in spawn_rack_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb:132:in
lookup_or_add' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb:246:inblock in spawn_rack_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb:82:in
block in synchronize' from :10:insynchronize' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server_collection.rb:79:in
synchronize' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb:244:inspawn_rack_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb:137:in
spawn_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb:357:in
server_main_loop' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/lib/phusion_passenger/abstract_server.rb:206:instart_synchronously' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/helper-scripts/passenger-spawn-server:99:in
'
The box is running Ubuntu 10.04 LTS and Apache/2.2.14 with Rails 3.1, Passenger 3.0.9, and Rack 1.3.2.
This is a rather simple site and I've run out of ideas.
精彩评论