Solr 4 to Solr6, Java heap space problem after upgrading to search service version 1.3

cancel
Showing results for 
Search instead for 
Did you mean: 
statira
Active Member

Solr 4 to Solr6, Java heap space problem after upgrading to search service version 1.3

@EddieMay @abhinavmishra14 

Unfortunately another problem arised, solr gets killed after running for some time with

# java.lang.OutOfMemoryError: Java heap space
# -XXSmiley SurprisednOutOfMemoryError="/opt/alfresco-community/alfresco-search-services/solr/bin/oom_solr.sh 8983 ../../logs"
# Executing /bin/sh -c "/opt/alfresco-community/alfresco-search-services/solr/bin/oom_solr.sh 8983 ../../logs"...
Running OOM killer script for process 14226 for Solr on port 8983
Killed process 14226

tried to modify solr.in.sh with no luck

SOLR_JAVA_MEM="-Xms4g -Xmx4g"

Never had this problem with Solr4 so I'm confused, does it really need so much memory? 

Could it be the java version problem? I'm running openjdk 13.0.4, is it supported by Alfresco and Solr?

1 Reply
abhinavmishra14
Advanced

Re: Solr 4 to Solr6, Java heap space problem after upgrading to search service version 1.3

@statira Ideally setting "SOLR_JAVA_MEM" should work. I tried on windows and centos7 environment and it works. 

Looks like you already tried setting "SOLR_JAVA_MEM="-Xms4g -Xmx4g" in 'solr.in.sh' file. This should have been sufficient to increase the heap memory. 

Can you open the solr admin console (http://127.0.0.1:8983/solr/#/) and validate what you see there in JVM section. e.g.:

Solradmin-jvm-details.PNG

 

solron-centos7.PNG

If you see the values correctly in the admin console, that means environment variable is working correctly. And you would have to determine the required memory based on your index size etc.

I don't think java version could be an issue because minimum java-8 is needed for ass v1.3 if i remember correctly, not sure . 

Check this issue as well: 

https://github.com/Alfresco/SearchServices/issues/233

https://github.com/Alfresco/SearchServices/issues/233#issuecomment-626145052

https://github.com/Alfresco/SearchServices/issues/234

https://github.com/Alfresco/SearchServices/issues/234#issuecomment-699843033

As per above issue and discussions seems these properties could be also a reason for heap issues... you may give it a try:

SOLR 6 can be configured to work as SOLR 4 was working in previous Alfresco versions by uncommenting alfresco.cross.locale.datatype.N properties in /opt/solr6/solrhome/conf/shared.properties.

alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext

These blog posts will also be helpful: 

https://www.ziaconsulting.com/developer-help/alfresco-solr-memory/

https://clouderatemp.wpengine.com/blog/2017/06/solr-memory-tuning-for-production-part-2/

~Abhinav
(ACSCE, AWS SAA, Azure Admin)