Problem in JVM heap size when migrating from Solr 5.0 to Solr 5.1

0

I have an instance of Solr 5.0.0 in production with the following JVM heap size setting:

SOLR_JAVA_MEM="-Xms2g -Xmx2g"

When I migrated to Solr 5.1.0 with the same configuration and started the server, I came across the OutOfMemoryError error. Observing the Solr API I noticed that the heap size was with 512m . My heap configuration is not working, causing the server to start with the default heap size.

    
asked by anonymous 09.06.2015 / 18:54

1 answer

1

There is a bug that occurs only in Solr 5.1. This bug has been fixed by the Apache Solr team and is in version 5.2 of Solr.

link

The problem is that Solr 5.1 no longer uses the SOLR_JAVA_MEM variable to change the size of the JVM heap. This version uses the SOLR_HEAP variable that changes the minimum and maximum heap with the same value:

SOLR_HEAP="2g"

In this way Solr will start with -Xms=2g and -Xmx=2g

In Solr 5.2 this problem has been fixed and the two variables SOLR_JAVA_MEM and SOLR_HEAP work correctly.

    
09.06.2015 / 18:59