太阳黑子宝石中的SystemStackError(堆栈级别太深)

时间:2013-04-08 06:19:19

标签: ruby-on-rails sunspot sunspot-rails sunspot-solr

我知道这是最难追查的错误。这是发生的事情: 我正在做一个涉及太阳黑子搜索的请求。对于返回合理的solr响应大小的所有请求,一切正常。对于solr响应超过1 MB的特定请求,我收到此错误:

SOLR Request (186.0ms)  [ path=#<RSolr::Client:0x00000006f76c18> parameters={data: fq=type%3AArticle&fq=review_im%3A46&start=0&rows=0&facet=true&f.source_i.facet.mincount=1&facet.field=source_i&facet.field=language_i&facet.field=publication_types_im&facet.field=features_im&facet.field=locations_im&facet.field=keyphrases_im&facet.field=journal_i&facet.field=authors_im&facet.field=year_i&f.language_i.facet.mincount=1&f.publication_types_im.facet.mincount=1&f.features_im.facet.mincount=1&f.locations_im.facet.limit=30&f.locations_im.facet.mincount=1&f.keyphrases_im.facet.limit=30&f.keyphrases_im.facet.mincount=1&f.journal_i.facet.sort=true&f.journal_i.facet.limit=-1&f.journal_i.facet.mincount=1&f.authors_im.facet.sort=true&f.authors_im.facet.limit=-1&f.authors_im.facet.mincount=1&f.year_i.facet.limit=-1&f.year_i.facet.mincount=1&q=%2A%3A%2A, method: post, params: {:wt=>:ruby}, query: wt=ruby, headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"}, path: select, uri: http://localhost:8982/solr/select?wt=ruby, open_timeout: , read_timeout: , retry_503: , retry_after_limit: } ]
Solr Select (186.3ms)  fq=type%3AArticle&fq=review_im%3A46&start=0&rows=0&facet=true&f.source_i.facet.mincount=1&facet.field=source_i&facet.field=language_i&facet.field=publication_types_im&facet.field=features_im&facet.field=locations_im&facet.field=keyphrases_im&facet.field=journal_i&facet.field=authors_im&facet.field=year_i&f.language_i.facet.mincount=1&f.publication_types_im.facet.mincount=1&f.features_im.facet.mincount=1&f.locations_im.facet.limit=30&f.locations_im.facet.mincount=1&f.keyphrases_im.facet.limit=30&f.keyphrases_im.facet.mincount=1&f.journal_i.facet.sort=true&f.journal_i.facet.limit=-1&f.journal_i.facet.mincount=1&f.authors_im.facet.sort=true&f.authors_im.facet.limit=-1&f.authors_im.facet.mincount=1&f.year_i.facet.limit=-1&f.year_i.facet.mincount=1&q=%2A%3A%2A
Completed 500 Internal Server Error in 650ms

SystemStackError (stack level too deep):
  actionpack (3.2.11) lib/action_dispatch/middleware/reloader.rb:70


  Rendered /home/hammady/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
  Rendered /home/hammady/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms)
  Rendered /home/hammady/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (8.7ms)
2013/04/08 08:53:05 [error] 7480#0: *6 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /reviews/46/results?mode=visible&polling=1&search=all HTTP/1.1", upstream: "passenger:unix:/passenger_helper_server:", host: "localhost:4000"

这是太阳黑子虫吗?

更新:不,这是一个红宝石VM问题,我报告了它here

1 个答案:

答案 0 :(得分:0)

我注意到您正在使用ruby-1.9.2-p320,并且另一个gem(delayed_job)报告了类似问题,其中reloader.rb导致了SystemStackError

https://github.com/collectiveidea/delayed_job/issues/349

该线程中有几个人(虽然不是很多人)通过升级到Ruby 1.9.3来修复它,所以你可能想尝试一下。