Search code examples
alfrescosolr6alfresco-search-services

GC / OOM problems with Alfresco Search Services and OpenJDK11


I updated Alfresco Search Services from 1.3 to 1.4 which forced me to also update OpenJDK from 8 to 11. Running Alfresco Search Services 1.3 with jdk8 worked without any OutOfMemoryExceptions during (re)indexing but with jdk11 we see repeatable growing the heap until the solr oom killer kills the solr process. During indexing the jvm performs continuously GC with jdk but I guess jdk11 changed GC in a way that the objects will stay longer in memory. Continuous GC indicates inefficient object creatrion but this is nothing I can influence. I tried with UseConcMarkSweepGC and G1 garbage collector but with the same behavior. Does anybody know a way how to configure GC in OpenJDK 11 to behave similar as in OpenJDK8 with Alfresco Search Services / solr6?

My parameters in solr.in.sh

SOLR_JAVA_MEM="-Xms16g -Xmx30g"
SOLR_OPTS="$SOLR_OPTS -Dsolr.jetty.request.header.size=1000000 -Dsolr.jetty.threads.stop.timeout=300000 -Ddisable.configEdit=true -Dsolr.allow.unsafe.resourceloading=true"
SOLR_OPTS="$SOLR_OPTS -XX:+UseConcMarkSweepGC -XX:-DisableExplicitGC -XX:-UseGCOverheadLimit"
SOLR_OPTS="$SOLR_OPTS -server -Djava.net.preferIPv4Stack=true -Duser.language=en -Duser.country=US -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv6Addresses=false"
SOLR_OPTS="$SOLR_OPTS -Dsun.security.ssl.allowUnsafeRenegotiation=true -Dsolr.allow.unsafe.resourceloading=true"

Solution

  • Issue is caused by a bug in the Alfresco Solr Tracker not recognizing recursions correctly (e.g. groups as member in groups or secondary child assocs in Alfresco). We worked around by replacing all secondary child associations by alfresco links. Alfresco Search Services 2.0 should have fixes for that recursion isse but that requires Alfresco Content Services 6.2