lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiří Kuhn <>
Subject RE: OutOfMemory example
Date Mon, 13 Sep 2004 15:22:59 GMT
Thanks for the bug's id, it seems like my problem and I have a stand-alone code with main().

What about slow garbage collector? This looks for me as wrong suggestion.

Let change the code once again:

    public static void main(String[] args) throws IOException, InterruptedException
        Directory directory = create_index();

        for (int i = 1; i < 100; i++) {
            System.err.println("loop " + i + ", index version: " + IndexReader.getCurrentVersion(directory));
            add_to_index(directory, i);
            Thread.sleep(1000);// whatever value you want

and in the 4th iteration java.lang.OutOfMemoryError appears again.


-----Original Message-----
From: John Moylan []
Sent: Monday, September 13, 2004 4:53 PM
To: Lucene Users List
Subject: Re: OutOfMemory example

you can close the index, but the Garbage Collector still needs to 
reclaim the memory and it may be taking longer than your loop to do so.


View raw message