You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by ts...@uni-mannheim.de on 2003/06/16 12:27:59 UTC

Too many files open

I try to include Lucene1.3-rc1 in a Java mail client.
The idea is to have an index for every folder that contains
mails. This might not be the best design though, because
i have to add and remove documents when moving mails...

My problem is that I sometimes get Exceptions like too many files
open or Out of memory after some mailmovement.

Any help or ideas how to better integrate Lucene in such an
enviroment?

Cheers
Timo

Platform: Linux, Sun JDK 1.4.1_02


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: couldn't rename segments.new to segments

Posted by Lixin Meng <li...@fulldegree.com>.
The Lucene jar file is 1.2-rc4, with JVM 1.3.1. It was on a single thread as
it tried to create a 'level-0' index.

I will try the latest build for it. Thanks.

Regards,
Lixin


-----Original Message-----
From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
Sent: Monday, June 16, 2003 5:57 PM
To: Lucene Users List
Subject: Re: couldn't rename segments.new to segments


I don't have a specific solution for you.  Are you accessing this inex
with multiple threads (e.g. in a web application)?  The problem is that
one process or thread is still referencing segments or deletable and
the OS is not letting Lucene rename it.
You didn't say which version of Lucene you are using.
If you are using some 1.2 version, I suggest you try one of the nightly
builds instead.  I remember we applied a patch submitted by a person
who uses Lucene on Windows, and it had to do with file renaming.
Perhaps it fixes your problem.

Otis


--- Lixin Meng <li...@fulldegree.com> wrote:
> I have a program and try to index a large collection of XML files.
> After
> about 9000 files (~2K each) , it will throw exception to complain
> that it
> couldn't rename 'segments.new' to 'segments' or rename
> 'deletable.new' to
> 'deletable'. But the file 'segments.new' or 'deletable.new' has write
> permission.
>
> Has anybody come across this before? More information at the end of
> this
> message.
>
> Regards,
> Lixin
>
> All files are stored on local disk.
>
> The actual message read as following:
>
> -----------
> ... couldnt rename segments.new to segments  Error Code: (2830620)
> ------------
>
> My java code looks like following:
>
> ----------------
>     try {
>       if (contentDoc != null) {
>         writer.addDocument(contentDoc);
>       }
>     } catch (java.io.IOException e) {
>       throw new XMLSearchException("Error adding doc " + urlPath +
>           " to IndexWriter: " + e.getMessage());
>     }
> ----------
>
> My machine has following configuration:
>
> ------------
> RAM:  512Mb
> OS:	Win2K with SP1
> CPU:	~800Mhz
> ------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: couldn't rename segments.new to segments

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I don't have a specific solution for you.  Are you accessing this inex
with multiple threads (e.g. in a web application)?  The problem is that
one process or thread is still referencing segments or deletable and
the OS is not letting Lucene rename it.
You didn't say which version of Lucene you are using.
If you are using some 1.2 version, I suggest you try one of the nightly
builds instead.  I remember we applied a patch submitted by a person
who uses Lucene on Windows, and it had to do with file renaming. 
Perhaps it fixes your problem.

Otis


--- Lixin Meng <li...@fulldegree.com> wrote:
> I have a program and try to index a large collection of XML files.
> After
> about 9000 files (~2K each) , it will throw exception to complain
> that it
> couldn't rename 'segments.new' to 'segments' or rename
> 'deletable.new' to
> 'deletable'. But the file 'segments.new' or 'deletable.new' has write
> permission.
> 
> Has anybody come across this before? More information at the end of
> this
> message.
> 
> Regards,
> Lixin
> 
> All files are stored on local disk.
> 
> The actual message read as following:
> 
> -----------
> ... couldnt rename segments.new to segments  Error Code: (2830620)
> ------------
> 
> My java code looks like following:
> 
> ----------------
>     try {
>       if (contentDoc != null) {
>         writer.addDocument(contentDoc);
>       }
>     } catch (java.io.IOException e) {
>       throw new XMLSearchException("Error adding doc " + urlPath +
>           " to IndexWriter: " + e.getMessage());
>     }
> ----------
> 
> My machine has following configuration:
> 
> ------------
> RAM:  512Mb
> OS:	Win2K with SP1
> CPU:	~800Mhz
> ------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


couldn't rename segments.new to segments

Posted by Lixin Meng <li...@fulldegree.com>.
I have a program and try to index a large collection of XML files. After
about 9000 files (~2K each) , it will throw exception to complain that it
couldn't rename 'segments.new' to 'segments' or rename 'deletable.new' to
'deletable'. But the file 'segments.new' or 'deletable.new' has write
permission.

Has anybody come across this before? More information at the end of this
message.

Regards,
Lixin

All files are stored on local disk.

The actual message read as following:

-----------
... couldnt rename segments.new to segments  Error Code: (2830620)
------------

My java code looks like following:

----------------
    try {
      if (contentDoc != null) {
        writer.addDocument(contentDoc);
      }
    } catch (java.io.IOException e) {
      throw new XMLSearchException("Error adding doc " + urlPath +
          " to IndexWriter: " + e.getMessage());
    }
----------

My machine has following configuration:

------------
RAM:  512Mb
OS:	Win2K with SP1
CPU:	~800Mhz
------------


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org