开发者

Missing .fnm file error when re-indexing with Sunspot on a remote Solr instance

I am having a weird issue with Solr. I am using Rails 3 with Sunspot gem and everything was fine when I was running off my local instance of Solr. But once I tried running same code in a different environment with more data (10M records or so as opposed to 20K in local environment) and remote Solr instance, Solr started throwing errors like this when I run rake sunspor:reindex:

Solr Response: Internal Server Error

And tomcat6 logs would contain an error like this:

Jul 5, 2011 10:14:29 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr4 path=/update params={wt=ruby} status=0 QTime=6
Jul 5, 2011 10:14:30 AM org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {add=[Project 395767, Project 396057, Project 396078, Project 396139, Project 396368, Project 396409, Project 396421, Project 396442, ... (8 added)]} 0 73
Jul 5, 2011 10:14:30 AM org.apache.solr.common.SolrException log
SEVERE: java.io.FileNotFoundException: /opt/solr/solr4/data/index/_0.fnm (No such file or directory)

It seems happening at random times (not the same project causes it).

I tried deleting Solr index folder and rebuilding index from scratch. That didn't have any effect except that Solr started complaining about different .fnm file.

Same error happens if I'm building my models in Rails. I was populating the d开发者_如何学运维atabase from .csv file and Sunspot would choke at random records

Solr Response: Internal Server Error

with the same missing .fnm file error on Solr server.

Did anyone experience anything like that? Any ideas at all would be welcome!


I think I have figured it out on my own. Problem was caused by incorrect Solr configuration. There were two Solr instances pointing to the same index directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜