gpt4 book ai didi

java - Apache solr 获取(打开的文件太多)

转载 作者:行者123 更新时间:2023-11-30 08:50:31 24 4
gpt4 key购买 nike

我们在生产环境中使用 Apache Solr,每周都会收到以下异常。

ERROR - 2015-06-19 00:45:02.127; org.apache.solr.common.SolrException; java.io.FileNotFoundException: /opt/solr/solr/list_activity_10_1847/data/index/_9_Lucene41_0.doc (Too many open files)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:389)
at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:282)
at org.apache.lucene.store.NRTCachingDirectory.unCache(NRTCachingDirectory.java:247)
at org.apache.lucene.store.NRTCachingDirectory.sync(NRTCachingDirectory.java:182)
at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4519)
at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2994)
at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3097)
at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3064)
at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:582)
at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:95)
at org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:64)
at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(DistributedUpdateProcessor.java:1707)
at org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1684)
at org.apache.solr.update.processor.LogUpdateProcessor.processCommit(LogUpdateProcessorFactory.java:157)
at org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:69)
at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:78)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)

删除不需要的核心并重新启动 Solr 后,此问题暂时得到解决。我无法确定根本原因并寻求一些帮助以永久解决问题。

最佳答案

很可能您的文件描述符用完了。运行 ulimit -n 查看每个进程的当前帐户限制。

在任何基于 lucene 的搜索引擎上,建议增加限制。按照您的操作系统说明永久增加进程可用的文件描述符。在此处查看一些其他信息: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

关于java - Apache solr 获取(打开的文件太多),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30950978/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com