当用户数量增加时,Lucene Indexing中的打开文件太多 [英] Too many open files in Lucene Indexing when number of users increase

查看:120
本文介绍了当用户数量增加时,Lucene Indexing中的打开文件太多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为我的网络应用程序使用Lucene Indexing和搜索技术。最初,我遇到了太多的打开文件问题,经过研究后我通过使用常见的IndexSearcher为单个用户修复了它。然后,当我用更多并发用户测试应用程序时,它再次开始带来打开文件太多问题。

I have been using Lucene Indexing and search technique for my web application. Initially I faced the "Too many Open files problem", after research I fixed it by using a common IndexSearcher for single user. Then, when I tested the application with a greater number of concurrent users, it again started to bring "Too many Open files problem".

我保留IndexSearcher对象特定用户的会话,它始终保持一些文件打开(他们当前正在使用)。即使有任何数量的用户,也可以帮助解决这个问题吗?

I am keeping the IndexSearcher Object in the session of particular user, which is always keeping a few files open(which they are currently using). Could any one please help to overcome this issue even if there is any number of users?

如果我在上述说明的任何地方都不清楚,请告诉我。

Let me know if I am not clear anywhere in the above explanation.

推荐答案

Lucene的FAQ有关于它的不错的条目

Lucene's FAQ has a nice entry about it.

简而言之:


  • 检查所有Lucene IndexReader,IndexWriter和IndexSearcher是否正确关闭

  • 尝试使用复合文件,这限制了创建的文件数

  • 增加操作系统上打开的文件句柄的限制

我遇到过与Lucene类似的问题在此之前,当您拥有大量并发用户时,可以轻松达到此限制。增加文件句柄限制工作完全正常。

I had similar problem with Lucene a while ago, and when you have a lot of concurrent users, this limit can easily be reached. Increasing the file handles limit worked perfectly fine.

这篇关于当用户数量增加时,Lucene Indexing中的打开文件太多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆