Java Exception while using Lucene

256 views Asked by At

Hi I tried a program using Lucene Plugin. I have multiple indexes, for searching multiple indexes I used "ParallelMultiSearcher". But while searching I m again and again getting the exception "Exception in thread "Thread-2" java.lang.OutOfMemoryError: Requested array size exceeds VM limit". I m using eclipse Helio IDE, UBUNTU 10.04 Operating system(32 bit). 3GB ram. Lucene 3.0.3 version. 10 index files, each contains 100 records(csv files, with 10 fields). VM Arguments settings -Xmx1024m -XX:MaxPermSize=1024m. But I tried to increase, some times I m getting Error occurred during initialization of VM Could not reserve enough space for object heap. Even I reduced the file size and tried, and instead 10 files, i reduced to 1 file, again and again, I m getting the same error. Please, suggest solution for the above. Thank you in advance....

1

There are 1 answers

1
Stephen C On

On 32 bit Ubuntu, a JVM process can ask for something like 2Gb of heap memory before it hits the hard limit imposed by the hardware. You've burned up half of that by asking for 1Gbyte of permgen heap. This seems way too much to me. Try with ~1.8Gb of ordinary heap and 200Mb of permgen.