我在rails应用程序的日志中经常看到此错误弹出Errno::EPIPE: Broken pipe
。我看到一些人有同样的错误,但问题是MySQL,Mongo或Passenger,这可以通过他们的堆栈跟踪来证明。我似乎在与红宝石交谈时遇到麻烦。任何人都可以帮我解读这个堆栈的痕迹或者帮助我找到正确的方向吗?
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/protocol.rb:177:in `write'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/protocol.rb:177:in `write0'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/protocol.rb:153:in `write'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/protocol.rb:168:in `writing'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/protocol.rb:152:in `write'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:1546:in `send_request_with_body'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:1531:in `exec'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:1049:in `request'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:1037:in `request'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:543:in `start'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:1035:in `request'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:845:in `post'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:154:in `rescue_action_without_handler'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:74:in `rescue_action'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:162:in `perform_action_without_flash'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `send'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process_without_filters'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `process'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in `process'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:437:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:87:in `dispatch'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
vendor/ruby/1.8/gems/haml-3.0.4/rails/../lib/sass/plugin/rack.rb:41:in `call'
vendor/ruby/1.8/gems/haml-3.0.4/rails/../lib/sass/plugin/rack.rb:41:in `call'
vendor/ruby/1.8/gems/rack-ie-redirect-fix-0.0.1/lib/rack-ie-redirect-fix.rb:11:in `call'
vendor/ruby/1.8/gems/rack-git-version-0.0.2/lib/rack-git-version.rb:14:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call'
vendor/ruby/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
vendor/ruby/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/session/abstract_store.rb:122:in `call'
vendor/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call'
vendor/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
vendor/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache'
vendor/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call'
vendor/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call'
vendor/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
vendor/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
vendor/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
vendor/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:106:in `call'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:99:in `spawn_application'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/utils.rb:479:in `safe_fork'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:84:in `spawn_application'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:230:in `spawn_rails_application'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/helper-scripts/passenger-spawn-server:99
答案 0 :(得分:0)
我认为在您的情况下,当您的程序尝试写入时,外部程序或服务器会断开连接。当你做某些具体的事情时会发生这种错误吗?