jeudi 3 août 2017

c undefined method `' for #0x5b776b6e>

I have a server with around 50 request per second. And I am getting randomly "NoMethodError" (with very low frequency). The same http request causing "NoMethodError" works fine after restarting server.

Max I could debug is Controller is looking for a action like "" (0 length string). Is 'around_filter' for Application controller buggy?

Here is the backtrace:

NoMethodError error_message="undefined method `' for #<Dash::V2::MyController:0x5b776b6e>

/gems/gems/actionpack-3.2.11/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/gems/gems/actionpack-3.2.11/lib/abstract_controller/base.rb:167:in `process_action'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal/rendering.rb:10:in `process_action'
/gems/gems/actionpack-3.2.11/lib/abstract_controller/callbacks.rb:18:in `process_action'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:429:in `_run__238585032__process_action__1257768870__callbacks'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:225:in `_conditional_callback_around_1215'
app/controllers/application_controller.rb:90:in `lagging_flag'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:224:in `_conditional_callback_around_1215'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:428:in `_run__238585032__process_action__1257768870__callbacks'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:390:in `_run_process_action_callbacks'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
/gems/gems/actionpack-3.2.11/lib/abstract_controller/callbacks.rb:17:in `process_action'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal/rescue.rb:29:in `process_action'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/gems/gems/activesupport-3.2.11/lib/active_support/notifications.rb:123:in `instrument'
/gems/gems/activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/gems/gems/activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:19:in `instrument'
/gems/gems/activesupport-3.2.11/lib/active_support/notifications.rb:123:in `instrument'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/gems/gems/activerecord-3.2.11/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/gems/gems/actionpack-3.2.11/lib/abstract_controller/base.rb:121:in `process'
/gems/gems/actionpack-3.2.11/lib/abstract_controller/rendering.rb:45:in `process'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal.rb:203:in `dispatch'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/gems/gems/actionpack-3.2.11/lib/action_controller/metal.rb:246:in `action'
org/jruby/RubyProc.java:281:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:36:in `call'
/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `call'
org/jruby/RubyArray.java:1613:in `each'
/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:601:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/server_details.rb:12:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/middleware/head.rb:14:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/json_exception_handler.rb:17:in `call'
/gems/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/gems/bundler/gems/rupert-e82e719b3f0c/lib/rupert.rb:23:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/middleware/callbacks.rb:28:in `call'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:408:in `_run__332066903__call__477376212__callbacks'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:390:in `_run_call_callbacks'
/gems/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/gems/gems/actionpack-3.2.11/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/request_time_logger.rb:19:in `call'
/gems/gems/activesupport-3.2.11/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/lib/jruby-stdlib-1.7.25.jar!/META-INF/http://ift.tt/2czL0TD `realtime'
/gems/gems/activesupport-3.2.11/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/request_time_logger.rb:18:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/request_time_logger.rb:16:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/gc_statistics_logger.rb:14:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/gc_statistics_logger.rb:13:in `call'
/gems/gems/railties-3.2.11/lib/rails/rack/logger.rb:32:in `call_app'
/gems/gems/railties-3.2.11/lib/rails/rack/logger.rb:16:in `call'
/gems/gems/activesupport-3.2.11/lib/active_support/tagged_logging.rb:22:in `tagged'
/gems/gems/railties-3.2.11/lib/rails/rack/logger.rb:16:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/request_id_generator.rb:33:in `call'
/gems/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/gems/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/log_flusher.rb:9:in `call'
/gems/bundler/gems/responseable-eac8dfa003a4/lib/responseable/middleware_start_header.rb:11:in `call'
/gems/gems/railties-3.2.11/lib/rails/engine.rb:479:in `call'
/gems/gems/railties-3.2.11/lib/rails/application.rb:223:in `call'
file:/lib/jruby-rack-1.1.19.jar!/rack/handler/servlet.rb:22:in `call'

Brief of ApplicationController:

around_filter :lagging_flag

def lagging_flag
    if params[:lagging] && params[:lagging].is_a?( Hash )
      Feature.override_lagging_config(params[:lagging]) do
        yield
      end
    else
      yield # => line number 90
    end
end

Aucun commentaire:

Enregistrer un commentaire