Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queries leak filehandles #10

Open
quartzjer opened this issue Sep 16, 2011 · 1 comment
Open

queries leak filehandles #10

quartzjer opened this issue Sep 16, 2011 · 1 comment

Comments

@quartzjer
Copy link

https://github.com/erictj/node-clucene/blob/master/src/clucene_bindings.cpp#L586

It looks like it's opening the indexreader twice, and it never closes them... also probably shouldn't re-open one every query?

@lhagan
Copy link
Contributor

lhagan commented Jun 13, 2012

I think I'm running into problems related to this issue. The example code works fine, but if I run multiple searches in a row, clucene eventually starts throwing errors: read past EOF. My understanding from searching around the net is that this could be a lot of things, but I ruled out index corruption, etc.

If I run var clucene = new cl.Lucene() before each search rather than once at the top of the script, I can get in more searches before clucene starts erroring out. The error message also changes to something more helpful: Too many open files, which is what lead me here.

Anyone have any further thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants