Results 1 to 3 of 3
  1. #1
    formadhukar is offline Member
    Join Date
    Mar 2010
    Posts
    2
    Rep Power
    0

    Unhappy OOM error while searching in lucene

    Dear All,

    Im new to lucene. Im facing problem while searching against lucene index of size 8+Gb. I dont know the reason behind that. Im pasting the error below

    Exception in thread "Thread-5" java.lang.OutOfMemoryError: Java heap space
    at org.apache.lucene.store.RAMOutputStream.flushBuffe r(RAMOutputStream.java:75)
    at org.apache.lucene.store.OutputStream.flush(OutputS tream.java:131)
    at org.apache.lucene.store.OutputStream.seek(OutputSt ream.java:160)
    at org.apache.lucene.store.RAMOutputStream.seek(RAMOu tputStream.java:101)
    at org.apache.lucene.index.CompoundFileWriter.close(C ompoundFileWriter.java:170)
    at org.apache.lucene.index.SegmentMerger.createCompou ndFile(SegmentMerger.java:152)
    at org.apache.lucene.index.SegmentMerger.merge(Segmen tMerger.java:100)
    at org.apache.lucene.index.IndexWriter.mergeSegments( IndexWriter.java:487)
    at org.apache.lucene.index.IndexWriter.flushRamSegmen ts(IndexWriter.java:440)
    at org.apache.lucene.index.IndexWriter.close(IndexWri ter.java:242)

    I dont know where the code goes wrong???

    Any help will be highly appreciated.

    Thanks & Regards,
    Madhukar Kumar

  2. #2
    peliukasss is offline Member
    Join Date
    Feb 2010
    Posts
    21
    Rep Power
    0

    Default

    You need to increase heap size

    if Java runs out of memory, the following error occurs:

    java.lang.OutOfMemoryError: Java heap space

    This can have two reasons:

    * Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
    * Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:

    java -Xms<initial heap size> -Xmx<maximum heap size>

    Defaults are:

    java -Xms32m -Xmx128m

    You can set this either in the Java Control Panel or on the command line, depending on the environment you run your application.

  3. #3
    formadhukar is offline Member
    Join Date
    Mar 2010
    Posts
    2
    Rep Power
    0

    Default

    Thanks a lot dear...

    I have already tried the second option but didnt tried the first one .Will try and revert to you.

    Thanks & Regards,
    Madhukar

Similar Threads

  1. Apache Lucene
    By dkarthiin in forum Lucene
    Replies: 0
    Last Post: 03-25-2010, 12:25 PM
  2. Lucene with unicode
    By goms in forum Lucene
    Replies: 1
    Last Post: 02-02-2010, 01:20 PM
  3. Queries in lucene
    By ctorresl in forum Lucene
    Replies: 1
    Last Post: 01-27-2010, 10:00 AM
  4. Lucene indexing ans searching code needed
    By vgarg80 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 06-07-2008, 11:31 AM
  5. Work On Lucene
    By peiceonly in forum Lucene
    Replies: 1
    Last Post: 08-07-2007, 05:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •