2016-06-08 79 views
1

我們正在運行一個rails應用程序,其中有3個webnode運行nginx和passenger 。Rails應用程序與#<ArgumentError:uncaught throw墜毀{:__ recursive_key __ => true,20687660 => true}>

然而過去的日子裏,我們遇到了500次錯誤的崩潰。 Theres在nginx錯誤日誌中沒有找到。軌道記錄給出了一個相當的非描述errormessage的,我希望一些你們可以幫助我追查:

ArgumentError: uncaught throw {:__recursive_key__=>true, 20687660=>true} 

堆棧跟蹤:

/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:29:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:12:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:57:in `block in nary' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:57:in `each' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:57:in `nary' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:29:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:12:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:169:in `block in visit_Array' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:169:in `each' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:169:in `visit_Array' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:29:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:12:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:146:in `visit_Arel_Nodes_SelectCore' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:29:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:12:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:169:in `block in visit_Array' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:169:in `each' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:169:in `visit_Array' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:29:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:12:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:153:in `visit_Arel_Nodes_SelectStatement' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:29:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/depth_first.rb:12:in `visit' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/visitors/visitor.rb:9:in `accept' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/arel-6.0.3/lib/arel/nodes/node.rb:56:in `each' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:210:in `grep' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:210:in `perform_calculation' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:127:in `calculate' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:42:in `count' 
/var/www/app/releases/20160607074820/app/models/webshop.rb:135:in `show_custom_pickup_identifier?' 
/var/www/app/releases/20160607074820/app/controllers/standard/shopify_controller.rb:176:in `block (2 levels) in shop_shipping' 
/var/www/app/releases/20160607074820/app/controllers/standard/shopify_controller.rb:173:in `each' 
/var/www/app/releases/20160607074820/app/controllers/standard/shopify_controller.rb:173:in `block in shop_shipping' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/relation/delegation.rb:46:in `each' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/relation/delegation.rb:46:in `each' 
/var/www/app/releases/20160607074820/app/controllers/standard/shopify_controller.rb:157:in `shop_shipping' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/implicit_render.rb:4:in `send_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:198:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/rendering.rb:10:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:92:in `__run_callbacks__' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:19:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/rescue.rb:29:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `block in instrument' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `instrument' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/params_wrapper.rb:250:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/railties/controller_runtime.rb:18:in `process_action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:137:in `process' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionview-4.2.4/lib/action_view/rendering.rb:30:in `process' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal.rb:196:in `dispatch' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_controller/metal.rb:237:in `block in action' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:76:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:76:in `dispatch' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:45:in `serve' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:43:in `block in serve' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:30:in `each' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:30:in `serve' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:821:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/params_parser.rb:27:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/flash.rb:260:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/cookies.rb:560:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/query_cache.rb:36:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:88:in `__run_callbacks__' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_call_callbacks' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/remote_ip.rb:78:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:38:in `call_app' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `block in call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `block in tagged' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:26:in `tagged' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `tagged' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/request_id.rb:21:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:518:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/application.rb:165:in `call' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `public_send' 
/var/www/app/shared/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `method_missing' 
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request' 
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request' 
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop' 
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads' 
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception' 

這似乎發生所有不同的地方該應用程序,除非它們不需要數據庫查詢。然而,我們的db看起來很健康,並且在連接,內存和cpu方面有很多容量。

希望有人能給我一個關於如何解決這個問題的線索。

感謝:-)

+0

什麼在'/var/www/app/releases/20160607074820/app/models/webshop.rb:135:in'show_custom_pickup_identifier?''? (或者你是說這並不總是拋出異常?) –

+0

你在你的代碼中使用'pp'(漂亮的打印)?如果是這樣,你可以嘗試發表評論嗎?我在ruby'pp'類(和'puma')中找到'__recursive_key__'的唯一引用。 – BoraMa

回答

0

感謝您的建議:-)

的例外情況定期扔 - 但它似乎是在調用數據庫只( - 在show_custom_pickup_identifier它只是做一個簡單的AR查詢? )。所以我追蹤了下來 - 我們認爲我們發現了AWS RDS IOPS限制中的問題。在應用更多存儲(因此更多的IOPS)後,它似乎已經消失 - 至少今天:-)如果亞馬遜明確指出我們已經沒有IOPS(!!),那將會很不錯。

因此對於現在我們將跨過我們的手指,這將永久解決問題:-)

相關問題