Tuesday, May 17, 2011

Increasing Java Heap Size - Posting Bigger Files in Apache SOLR

In some cases we need to post bigger xml file in SOLR server for indexing, if you post the file directly you get OutOfMemoryExceptions to avoid such failure, we need to change the max memory size that the heap can reach for the JVM

Here is the Command by which we can increase the heap size
java -Xms128m -Xmx8192m - jar

So in order to post bigger files now we use
java -Xms128m -Xmx8192m - jar post.jar <*.xml>

The -Xmx argument defines the max memory size that the heap can reach for JVM.
The -Xms argument sets the initial heap memory size for the JVM.

-Varun Rathore

No comments:

About Me