Search code examples
ruby-on-railsthinking-sphinx

Riddle::OutOfBoundsError (searchd error (status: 1): per-query max_matches=1000 out of bounds (per-server max_matches=500))


I upgraded a rails application and I ended having this error in staging environment. It worked fine until I restart my searchd. I regenerated the config and re-indexed. I do have an old copy but it does not seem to work with it as well.

Any help greatly appreciated.

Riddle::OutOfBoundsError (searchd error (status: 1): per-query max_matches=1000 out of bounds (per-server max_matches=500)): riddle (1.5.11) lib/riddle/client.rb:682:in request' riddle (1.5.11) lib/riddle/client.rb:228:inrun' riddle (1.5.11) lib/riddle/client.rb:347:in query' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/connection.rb:58:inmethod_missing' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:439:in block (3 levels) in populate' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:403:inblock in take_client' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/connection.rb:16:in block in take' innertube (1.0.2) lib/innertube.rb:127:intake' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/connection.rb:13:in take' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:401:intake_client' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:438:in block (2 levels) in populate' activesupport (3.0.6) lib/active_support/notifications.rb:52:inblock in instrument' activesupport (3.0.6) lib/active_support/notifications/instrumenter.rb:21:in instrument' activesupport (3.0.6) lib/active_support/notifications.rb:52:ininstrument' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:566:in log' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:575:inlog' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:437:in block in populate' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:616:incall' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:616:in retry_on_stale_index' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:434:inpopulate' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search.rb:187:in method_missing' /home/kartz/.rvm/gems/ruby-1.9.3-p484@rails3.0.6/bundler/gems/thinking-sphinx-55788f7b963a/lib/thinking_sphinx/search_methods.rb:412:insearch_count' app/models/community_stats.rb:27:in gather_profile_counts' app/controllers/account_controller.rb:107:inprofiles' actionpack (3.0.6) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (3.0.6) lib/abstract_controller/base.rb:150:inprocess_action' actionpack (3.0.6) lib/action_controller/metal/rendering.rb:11:in process_action' actionpack (3.0.6) lib/abstract_controller/callbacks.rb:18:inblock in process_action' activesupport (3.0.6) lib/active_support/callbacks.rb:477:in block in _run__4420398368285199037__process_action__2238027022263059472__callbacks' activesupport (3.0.6) lib/active_support/callbacks.rb:221:inblock in _conditional_callback_around_7795' vendor/plugins/clicktale/lib/astrails/clicktale/controller.rb:28:in clicktaleize' activesupport (3.0.6) lib/active_support/callbacks.rb:220:in_conditional_callback_around_7795' activesupport (3.0.6) lib/active_support/callbacks.rb:446:in _run__4420398368285199037__process_action__2238027022263059472__callbacks' activesupport (3.0.6) lib/active_support/callbacks.rb:410:in_run_process_action_callbacks' activesupport (3.0.6) lib/active_support/callbacks.rb:94:in run_callbacks' actionpack (3.0.6) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.0.6) lib/action_controller/metal/instrumentation.rb:30:in block in process_action' activesupport (3.0.6) lib/active_support/notifications.rb:52:inblock in instrument' activesupport (3.0.6) lib/active_support/notifications/instrumenter.rb:21:in instrument' activesupport (3.0.6) lib/active_support/notifications.rb:52:ininstrument' actionpack (3.0.6) lib/action_controller/metal/instrumentation.rb:29:in process_action' actionpack (3.0.6) lib/action_controller/metal/rescue.rb:17:inprocess_action'


Solution

  • As a summary for all the comments, riddle has max_matches as the argument in the code. It will be helpful to pass max_matches depending on the configurations.

    Article.search 'pancakes', :max_matches => 10_000

    Ref:https://pat.github.io/thinking-sphinx/advanced_config.html