论坛首页 入门技术论坛

使用solr的困惑!

浏览 3177 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-10-16  
使用solr不长时间,环境是linux as4,到现在solr的文件大小正常大约11G了。
solr放在一台服务器上,利用另一台服务器通过URL进行调用,
但是有一个问题,重建几十万索引好几次都这样,利用solr的接口优化,但是每次索引文件比较大的时候
例如现在11G,他的优化就报错:

com.xx.cms.solr.client.SolrServerException: Server returned non-zero status: 
Caused by:
Server side exception, status = 1: java.lang.NullPointerException
	at org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:174)
	at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:90)
	at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:284)
	at org.apache.lucene.index.IndexReader.document(IndexReader.java:357)
	at org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:186)
	at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:88)
	at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:709)
	at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:686)
	at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:543)
	at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:459)
	at org.apache.solr.core.SolrCore.update(SolrCore.java:754)
	at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:52)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
	at java.lang.Thread.run(Thread.java:595)

	at com.xx.cms.solr.client.AbstractDocumentManagerClient.serverCall(AbstractDocumentManagerClient.java:149)
	at com.xx.cms.solr.client.DocumentManagerClient.optimize(DocumentManagerClient.java:205)
	[color=red]at com.xx.cms.system.IndexCommit.optimize(IndexCommit.java:45)[/color]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:270)
	at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:199)
	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

而在solr的服务器上报的就是IO读写错误。
每天都执行操作每天都报这个错误。
solr应该跟lucence一样,优化的时候先把文件都复制一遍,然后在删除合并。
我一直怀疑是不是文件11G太大了,在复制的过程中报错。
大家有没有遇到过这样情况
   发表时间:2008-09-12  
没有遇到,不过我的索引没你那么大,我有7g左右。
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics