unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* "NoMethodError: undefined method" after switching to unicorn
       [not found] <9E260BC166D04FF1B0B7CBC563B221BA@gmail.com>
@ 2011-06-30  3:33 ` Tiago Scolari
  2011-06-30  5:04   ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Tiago Scolari @ 2011-06-30  3:33 UTC (permalink / raw)
  To: mongrel-unicorn

Hello,
I'm having a lot of "NoMethodError: undefined method" errors after I moved from thin to unicorn.

This seems to happen only with active records, and dynamic methods, like:
find_by_*, scoped_by_*, ...

It seems to be random, at least I haven't found relation yet.
I may reload the same page 10 times, sometimes it will work ok, some times it will give me this error.

I've 2 sites having this issue, one uses rails 3.0.9 (r 1.9.2) and other with 2.3.8 (r 1.8.7).
As i said, the issue started after I switched to unicorn.

Any idea what could cause this?



Here are some backtraces from hoptoad:
-- Rails 2.3.8 app:


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/base.rb:1872:in `method_missing_without_paginate'


vendor/plugins/will_paginate/lib/will_paginate/finder.rb:183:in `method_missing'


app/controllers/games_controller.rb:92:in `load_platform'


[GEM_ROOT]/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:178:in `send'


[GEM_ROOT]/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:178:in `evaluate_method'


[GEM_ROOT]/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:166:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/filters.rb:225:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/filters.rb:629:in `run_before_filters'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/filters.rb:615:in `call_filters'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'


[GEM_ROOT]/gems/activesupport-2.3.8/lib/active_support/core_ext/benchmark.rb:17:in `ms'


/usr/local/lib/ruby/1.8/benchmark.rb:308:in `realtime'


[GEM_ROOT]/gems/activesupport-2.3.8/lib/active_support/core_ext/benchmark.rb:17:in `ms'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/flash.rb:151:in `perform_action_without_newrelic_trace'


vendor/plugins/rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:254:in `perform_action'


vendor/plugins/rpm/lib/new_relic/agent/method_tracer.rb:141:in `trace_execution_scoped'


vendor/plugins/rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:247:in `perform_action'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/base.rb:532:in `send'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/base.rb:532:in `process_without_filters'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/filters.rb:606:in `process'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/base.rb:391:in `process'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/base.rb:386:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:438:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:87:in `dispatch'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:121:in `_call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:130


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/query_cache.rb:29:in `call'


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/query_cache.rb:29:in `call'


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/query_cache.rb:9:in `cache'


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/query_cache.rb:28:in `call'


[GEM_ROOT]/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:50:in `call_app!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:32:in `call!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:19:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:50:in `call_app!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:32:in `call!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:19:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:50:in `call_app!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:32:in `call!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:19:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:50:in `call_app!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:32:in `call!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:19:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:50:in `call_app!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:32:in `call!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:19:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:50:in `call_app!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:32:in `call!'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/strategy.rb:19:in `call'


[GEM_ROOT]/gems/oa-core-0.1.6/lib/omniauth/builder.rb:30:in `call'


lib/flash_session_cookie_middleware.rb:13:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/string_coercion.rb:25:in `call'


[GEM_ROOT]/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'


[GEM_ROOT]/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/params_parser.rb:15:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/session/abstract_store.rb:128:in `call'


[GEM_ROOT]/gems/activesupport-2.3.8/lib/active_support/cache/strategy/local_cache.rb:25:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/failsafe.rb:26:in `call'


[GEM_ROOT]/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:106:in `call'


[GEM_ROOT]/gems/rails-2.3.8/lib/rails/rack/static.rb:31:in `call'


[GEM_ROOT]/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'


[GEM_ROOT]/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'


[GEM_ROOT]/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'


[GEM_ROOT]/gems/unicorn-4.0.0/lib/unicorn/http_server.rb:518:in `process_client'


[GEM_ROOT]/gems/unicorn-4.0.0/lib/unicorn/http_server.rb:584:in `worker_loop'


vendor/plugins/rpm/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:7:in `call'


vendor/plugins/rpm/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:7:in `worker_loop'


[GEM_ROOT]/gems/unicorn-4.0.0/lib/unicorn/http_server.rb:475:in `spawn_missing_workers'


[GEM_ROOT]/gems/unicorn-4.0.0/lib/unicorn/http_server.rb:135:in `start'


[GEM_ROOT]/gems/unicorn-4.0.0/bin/unicorn_rails:209


/usr/local/bin/unicorn_rails:19:in `load'


/usr/local/bin/unicorn_rails:19













-- Rails 3.0.9 app:






[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/base.rb:989:in `method_missing'


app/helpers/application_helper.rb:154:in `render_tv'


app/views/home/index.html.haml:8:in `_app_views_home_index_html_haml___1954184739576368685_58305940__2978367022487903250'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/template.rb:135:in `block in render'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications.rb:54:in `instrument'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/template.rb:127:in `render'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/render/rendering.rb:59:in `block in _render_template'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in `block in instrument'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in `instrument'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in `instrument'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/render/rendering.rb:56:in `_render_template'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/render/rendering.rb:26:in `render'


[GEM_ROOT]/gems/haml-3.1.2/lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/rendering.rb:115:in `_render_template'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/rendering.rb:109:in `render_to_body'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/renderers.rb:47:in `render_to_body'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/rendering.rb:102:in `render_to_string'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/rendering.rb:93:in `render'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/rendering.rb:17:in `render'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'


/home/todaela/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/core_ext/benchmark.rb:5:in `ms'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:40:in `block in render'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'


[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'


[GEM_ROOT]/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/action_controller.rb:12:in `cleanup_view_runtime'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:39:in `render'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/implicit_render.rb:10:in `default_render'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/implicit_render.rb:5:in `send_action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/base.rb:150:in `process_action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/rendering.rb:11:in `process_action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/callbacks.rb:18:in `block in process_action'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/callbacks.rb:451:in `_run__1893485971492116310__process_action__3270121157045284473__callbacks'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/callbacks.rb:94:in `run_callbacks'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/callbacks.rb:17:in `process_action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in `block in instrument'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in `instrument'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/notifications.rb:52:in `instrument'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/instrumentation.rb:29:in `process_action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/rescue.rb:17:in `process_action'


[GEM_ROOT]/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:34:in `block in process_action'


[GEM_ROOT]/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:253:in `block in perform_action_with_newrelic_trace'


[GEM_ROOT]/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in `trace_execution_scoped'


[GEM_ROOT]/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:248:in `perform_action_with_newrelic_trace'


[GEM_ROOT]/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:33:in `process_action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/base.rb:119:in `process'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/abstract_controller/rendering.rb:41:in `process'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal.rb:138:in `dispatch'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_controller/metal.rb:178:in `block in action'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:62:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:27:in `call'


[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `block in call'


[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `block in recognize'


[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:68:in `optimized_each'


[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize'


[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:493:in `call'


[GEM_ROOT]/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:44:in `call!'


[GEM_ROOT]/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:30:in `call'


[GEM_ROOT]/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:44:in `call!'


[GEM_ROOT]/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:30:in `call'


[GEM_ROOT]/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:44:in `call!'


[GEM_ROOT]/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:30:in `call'


[GEM_ROOT]/gems/barista-1.2.1/lib/barista/server.rb:33:in `call'


[GEM_ROOT]/gems/newrelic_rpm-3.1.0/lib/new_relic/rack/browser_monitoring.rb:18:in `call'


[GEM_ROOT]/gems/sass-3.1.2/lib/sass/plugin/rack.rb:54:in `call'


[GEM_ROOT]/gems/warden-1.0.4/lib/warden/manager.rb:35:in `block in call'


[GEM_ROOT]/gems/warden-1.0.4/lib/warden/manager.rb:34:in `catch'


[GEM_ROOT]/gems/warden-1.0.4/lib/warden/manager.rb:34:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/head.rb:14:in `call'


[GEM_ROOT]/gems/rack-1.2.3/lib/rack/methodoverride.rb:24:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/params_parser.rb:21:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/flash.rb:182:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/cookies.rb:302:in `call'


[GEM_ROOT]/gems/ckeditor-3.5.4/lib/ckeditor/middleware.rb:15:in `call'


[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/query_cache.rb:32:in `block in call'


[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'


[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/query_cache.rb:12:in `cache'


[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/query_cache.rb:31:in `call'


[GEM_ROOT]/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/callbacks.rb:416:in `_run_call_callbacks'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/callbacks.rb:44:in `call'


[GEM_ROOT]/gems/rack-1.2.3/lib/rack/sendfile.rb:107:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'


[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'


[GEM_ROOT]/gems/railties-3.0.9/lib/rails/rack/logger.rb:13:in `call'


[GEM_ROOT]/gems/rack-1.2.3/lib/rack/runtime.rb:17:in `call'


[GEM_ROOT]/gems/activesupport-3.0.9/lib/active_support/cache/strategy/local_cache.rb:72:in `call'


[GEM_ROOT]/gems/rack-1.2.3/lib/rack/lock.rb:11:in `block in call'


:


[GEM_ROOT]/gems/rack-1.2.3/lib/rack/lock.rb:11:in `call'







Thank you

-- 
Tiago Scolari

_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "NoMethodError: undefined method" after switching to unicorn
  2011-06-30  3:33 ` Tiago Scolari
@ 2011-06-30  5:04   ` Eric Wong
  2011-06-30 19:45     ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2011-06-30  5:04 UTC (permalink / raw)
  To: unicorn list

Tiago Scolari <tscolari@gmail.com> wrote:
> Hello, I'm having a lot of "NoMethodError: undefined method" errors
> after I moved from thin to unicorn.
> 
> This seems to happen only with active records, and dynamic methods,
> like: find_by_*, scoped_by_*, ...
> 
> It seems to be random, at least I haven't found relation yet.  I may
> reload the same page 10 times, sometimes it will work ok, some times
> it will give me this error.
> 
> I've 2 sites having this issue, one uses rails 3.0.9 (r 1.9.2) and
> other with 2.3.8 (r 1.8.7).  As i said, the issue started after I
> switched to unicorn.
> 
> Any idea what could cause this?

Are you using preload_app?

> vendor/plugins/rpm/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:7:in
> `call'

Hrm, I wonder if the above file depends on (undocumented) Unicorn internals
that changed in unicorn 4.0.0?

> [GEM_ROOT]/gems/unicorn-4.0.0/lib/unicorn/http_server.rb:475:in
> `spawn_missing_workers'

It might be worth it to try unicorn 3.7.0 since 4.0.0 was just released
and some gems that depend on internal implementation details could
be broken.


Maybe somebody else here has a better explanation...

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "NoMethodError: undefined method" after switching to unicorn
  2011-06-30  5:04   ` Eric Wong
@ 2011-06-30 19:45     ` Eric Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2011-06-30 19:45 UTC (permalink / raw)
  To: unicorn list

Eric Wong <normalperson@yhbt.net> wrote:
> Tiago Scolari <tscolari@gmail.com> wrote:
> > Any idea what could cause this?
> 
> Are you using preload_app?

(private response said "yes")

> > vendor/plugins/rpm/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:7:in
> > `call'
> 
> Hrm, I wonder if the above file depends on (undocumented) Unicorn internals
> that changed in unicorn 4.0.0?
> 
> > [GEM_ROOT]/gems/unicorn-4.0.0/lib/unicorn/http_server.rb:475:in
> > `spawn_missing_workers'
> 
> It might be worth it to try unicorn 3.7.0 since 4.0.0 was just released
> and some gems that depend on internal implementation details could
> be broken.

Reverting to 3.7.0 appears to have fixed the issue for the user.

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "NoMethodError: undefined method" after switching to unicorn
@ 2011-07-08 23:29 Marc Sernatinger
  2011-07-11  8:23 ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Sernatinger @ 2011-07-08 23:29 UTC (permalink / raw)
  To: mongrel-unicorn; +Cc: Peter Fitzgibbons

Tiago Scolari <tscolari <at> gmail.com> writes:

> 
> Hello,
> I'm having a lot of "NoMethodError: undefined method" errors after I moved from thin to unicorn.
> 
> This seems to happen only with active records, and dynamic methods, like:
> find_by_*, scoped_by_*, ...
> 
> It seems to be random, at least I haven't found relation yet.
> I may reload the same page 10 times, sometimes it will work ok, some times it will give me this error.
> 
> I've 2 sites having this issue, one uses rails 3.0.9 (r 1.9.2) and other with 2.3.8 (r 1.8.7).
> As i said, the issue started after I switched to unicorn.
> 
> Any idea what could cause this?
> 
> Here are some backtraces from hoptoad:

This is one of the errors we see as part of our issues with our database connection when using unicorn.  Do you have any information about your stack to share? 

Thanks,
Marc
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "NoMethodError: undefined method" after switching to unicorn
  2011-07-08 23:29 "NoMethodError: undefined method" after switching to unicorn Marc Sernatinger
@ 2011-07-11  8:23 ` Eric Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2011-07-11  8:23 UTC (permalink / raw)
  To: unicorn list; +Cc: Peter Fitzgibbons

Marc Sernatinger <marc@vailsys.com> wrote:
> Tiago Scolari <tscolari <at> gmail.com> writes:
> > Here are some backtraces from hoptoad:
> 
> This is one of the errors we see as part of our issues with our
> database connection when using unicorn.  Do you have any information
> about your stack to share? 

He was using preload_app, but seems to have fixed it by reverting to
an older Unicorn (3.7.0, he was on 4.0.0, so you seem to be hitting a
a different problem).

ref: http://mid.gmane.org/20110630194515.GA29105@dcvr.yhbt.net

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-11  8:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08 23:29 "NoMethodError: undefined method" after switching to unicorn Marc Sernatinger
2011-07-11  8:23 ` Eric Wong
     [not found] <9E260BC166D04FF1B0B7CBC563B221BA@gmail.com>
2011-06-30  3:33 ` Tiago Scolari
2011-06-30  5:04   ` Eric Wong
2011-06-30 19:45     ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).