简体   繁体   中英

SystemStackError (stack level too deep) in sunspot gem

I know this is the hardest error to trace. This is what happens: I am doing a request involving sunspot search. For all requests that return reasonable solr response size, everything works fine. For a specific request where solr response is more than 1 MB, I get this error:

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"

Is this a sunspot bug?

Update: No, that's a ruby VM issue, I reported it here .

I notice you're using ruby-1.9.2-p320, and a similar issue was reported in another gem (delayed_job) where reloader.rb was causing a SystemStackError :

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

Several people (though not quite everyone) in that thread reported it fixed by upgrading to Ruby 1.9.3, so you may want to try that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM