- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我们正在运行一个具有大量请求(每分钟 400 个请求)的 Rails 应用程序,其中有 3 个网络节点运行 nginx 和 passenger。
然而,过去几天我们遇到了几次崩溃并出现 500 错误。在 nginx 错误日志中找不到任何内容。 Rails 日志给出了一个相当非描述性的错误消息,我希望你们中的一些人可以帮助我追踪:
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'
它似乎发生在应用程序的所有不同位置,除非不需要数据库查询。然而,我们的数据库看起来很健康,并且在连接、内存和 cpu 方面有很多容量。
希望有人能告诉我如何解决这个问题。
谢谢 :-)
最佳答案
感谢您的建议:-)
异常确实会定期抛出 - 但它似乎只在数据库调用时抛出( - 在 show_custom_pickup_identifier 中?它只进行简单的 AR 查询)。所以我追踪到了它 - 我们认为我们发现了 AWS RDS IOPS 限制中的问题。在应用更多存储空间(因此更多 IOPS)之后,它似乎已经消失了 - 至少在今天 :-) 如果亚马逊有一个明确的指示表明我们已经用完 IOPS 就好了 (!!)..
所以现在我们祈祷这将永久解决问题:-)
关于ruby-on-rails - Rails 应用程序崩溃并显示 #<ArgumentError : uncaught throw {:__recursive_key__=>true, 20687660=>true}>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37693847/
我一直认为“throw”和“throw ex”的区别was that throw alone wasn't resetting the stacktrace of the exception. 不幸的
我需要处理这样的api错误代码,并为某些状态代码抛出错误。但是遵循代码显示了以上错误。我怎样才能做到这一点? func login(data: [String: Any], completion: @
我见过在 JavaScript 中抛出错误的 3 种不同方式: throw 'message'; throw Error('message'); throw new Error('message');
这个问题在这里已经有了答案: Exception handling : throw, throws and Throwable (8 个答案) 关闭 10 年前。 谁能简单介绍一下Java异常处理中
这是我的代码: func loadData() { ref.child(currentUserID!).observe(.childAdded) { (snapshot) in
可能很明显,但是我仍然无法理解throw和rethrow之间的区别,什么时候应该使用它们中的任何一个? 最佳答案 根据Effective Dart: If you decide to rethrow
这个问题在这里已经有了答案: "new" keyword in Scala (3 个答案) 关闭 5 年前。 在 Scala 中进行一些函数式编程,并且来自 Java 背景,我倾向于像这样抛出异常:
我有一个验证输入字符串的代码,如果输入字符串与所需的格式不匹配,我需要抛出 IllegalArgumentException,有多个字段,每个字段都有一组不同的验证条件,因此对于当前我正在执行的每个字
我的方法有一个抛出 NullPointerException 的返回类型。 public class Student { public String studentOne() {
有些帖子询问这两者之间的区别。 (为什么我要提这个...) 但我的问题在某种程度上有所不同,我在另一个错误神级处理方法中调用了“throw ex”。 public class Program {
谁能解释一下 throw、throws 和 Throwable 之间的区别以及何时使用哪个? 最佳答案 throws :在编写方法时使用,声明有问题的方法抛出了指定的(检查的)异常。 与检查的异常相反
我想知道编写异常收件箱和发件箱是否会改变特定程序的行为,例如 抛出 MyException(); 和 抛出(我的异常()); 我的代码: #include #include using names
抛出异常时,保留堆栈跟踪是最常见的期望行为,在 Java 中,这可以通过 throw ex; 获得,但在 C# 中,throw; 必须使用。 (另请注意,许多 C# 程序员经常错误地使用 throw
这个问题在这里已经有了答案: Exception handling : throw, throws and Throwable (8 个答案) 关闭 8 年前。 谁能举个例子说清楚Java异常处理中
这两个有什么区别吗? 最佳答案 异常是针对程序逻辑中的错误。 JVM 使用错误来表示环境有问题,例如 OutOfMemoryError 或 IncompatibleClassChangeError。
我试图到处寻找这个问题的答案,但似乎我运气不好。 我有一个非常简单的 Mongoose 模型 var userObject = { profile: { username: {
我遇到了这个重新抛出的异常,我很惊讶它甚至可以编译。 } catch(SomeException e) { ... throw(e); } 这个throw()和平时用的有什么区别吗?.
想象两段相似的代码: try { [...] } catch (myErr &err) { err.append("More info added to error..."); throw
我试图弄清楚Java中方法签名中的抛出和抛出语句之间的区别。方法签名中的抛出如下: public void aMethod() throws IOException{ FileReader f
这个问题在这里已经有了答案: throw Error('msg') vs throw new Error('msg') (2 个回答) 24 天前关闭。 没有 new 时抛出错误有什么缺点吗?关键词?
我是一名优秀的程序员,十分优秀!