solr service stops every day

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

solr service stops every day

Jump to solution

OS: CentOS 7

Alfresco: 6.2.0 Community

solr: Alfresco Search Services 1.3.1 using Apache Solr 6.6.5

Java: java-11-openjdk-11.0.10.0.9-1.el7_9.x86_64

Every day the solr service stops working. The only message I was able to get in it's solr.log is "ERROR (qtp947679291-17) [ x:alfresco] o.a.s.h.RequestHandlerBase org.apache.lucene.util.automaton.TooComplexToDeterminizeException: Determinizing automaton with 15226 states and 30003 transitions would result in more than 10000 states."

In solr_oom_killer-8983-2021-05-13_17_38_52.log:

"Running OOM killer script for process 2423 for Solr on port 8983
Killed process 2423"

The issue started last week, indexes has been rebuilt since then, no effect. What can cause this error?

1 Solution

Accepted Solutions
Peter_Adam_SB
Active Member II

Re: solr service stops every day

Jump to solution

I have changed the SOLR_JAVA_MEM="-Xms1g -Xmx1g" setting to SOLR_JAVA_MEM="-Xms1g -Xmx4g" in the solr.in.sh file.

Today there were no stops.

solr status shows now stable 1.1 GB used out of 2.3 GB.

View solution in original post

8 Replies
angelborroy
Alfresco Employee

Re: solr service stops every day

Jump to solution

Do you have additional log?

It should be required to identify the operation that is provoking this exception.

Hyland Developer Evangelist
Peter_Adam_SB
Active Member II

Re: solr service stops every day

Jump to solution

I have found this in catalina.out three minutes before:

2021-05-13 17:35:08,540  INFO  [webscripts.connector.RemoteClient] [https-openssl-nio-8443-exec-18] Exceptio
n calling (GET) http://localhost:8080/alfresco/s/slingshot/search?facetFields=%7Bhttp%3A%2F%2Fwww.alfresco.o
rg%2Fmodel%2Fcontent%2F1.0%7Dcreator%2C%7Bhttp%3A%2F%2Fwww.alfresco.org%2Fmodel%2Fcontent%2F1.0%7Dcontent.mi
metype%2C%7Bhttp%3A%2F%2Fwww.alfresco.org%2Fmodel%2Fcontent%2F1.0%7Dcreated%2C%7Bhttp%3A%2F%2Fwww.alfresco.o
rg%2Fmodel%2Fcontent%2F1.0%7Dcontent.size%2C%7Bhttp%3A%2F%2Fwww.alfresco.org%2Fmodel%2Fcontent%2F1.0%7Dmodif
ier%2C%7Bhttp%3A%2F%2Fwww.alfresco.org%2Fmodel%2Fcontent%2F1.0%7Dmodified&filters=&encodedFilters=&term=0096
5806*&tag=&startIndex=0&sort=&site=&rootNode=alfresco%3A%2F%2Fcompany%2Fhome&repo=true&query=&pageSize=25&ma
xResults=0&noCache=1620920108282&spellcheck=true&highlightPrefix=%02&highlightPostfix=%03&highlightFields=cm
%3Aname%2Ccm%3Adescription%2Ccm%3Atitle%2Ccontent%2Cia%3AdescriptionEvent%2Cia%3AwhatEvent%2Clnk%3Atitle&hig
hlightFragmentSize=100&highlightSnippetCount=255&highlightMergeContiguous=false&highlightUsePhraseHighlighte
r=true&alf_ticket=TICKET_29198e4a927c3d4ee4066959751844e01f143a02
angelborroy
Alfresco Employee

Re: solr service stops every day

Jump to solution

You could try to increase default value for maxDeterminizedStates (https://solr.apache.org/guide/6_6/tokenizers.html#Tokenizers-SimplifiedRegularExpressionPatternToken...) but not sure why this exception is happening.

Hyland Developer Evangelist
Peter_Adam_SB
Active Member II

Re: solr service stops every day

Jump to solution

I have only the following tokenizers in my /opt/alfresco-6.2.0/alfresco-search-services/solrhome/alfresco/conf/schema.xml config file:

  • solr.KeywordTokenizerFactory
  • solr.StandardTokenizerFactory
  • solr.ICUTokenizerFactory
  • org.apache.solr.analysis.WordDelimiterFilterFactory
  • solr.JapaneseTokenizerFactory
  • org.apache.lucene.analysis.th.ThaiTokenizerFactory

Should I replace one (for example, for the Hungarian language)? Or look somewhere else?

Peter_Adam_SB
Active Member II

Re: solr service stops every day

Jump to solution

I have changed the SOLR_JAVA_MEM="-Xms1g -Xmx1g" setting to SOLR_JAVA_MEM="-Xms1g -Xmx4g" in the solr.in.sh file.

Today there were no stops.

solr status shows now stable 1.1 GB used out of 2.3 GB.

EddieMay
Alfresco Employee

Re: solr service stops every day

Jump to solution

Hi @Peter_Adam_SB 

Great news you got a fix & thanks for updating your thread - super useful to other users.

Best wishes,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
erkut3512
Member II

Re: solr service stops every day

Jump to solution

Where is the file location of solr.in.sh ?  I couldnt find it. Can you help please ?

Alfresco 5.2

abhinavmishra14
Advanced

Re: solr service stops every day

Jump to solution

It depends on what version of solr you are using. For solr6, it is available at the root of the installation path. 

For example if you have installed solr6  (ASS 1.0 to ASS 1.3 is supported for ACS5.2.x) in:

Windows: C:\alfresco-search-services-1.3.0, then solr.in.cmd can be found: C:\alfresco-search-services-1.3.0\solr.in.cmd

Linux: /usr/local/alfresco-search-services-1.3.0 then solr.in.sh can be found: /usr/local/alfresco-search-services-1.3.0/solr.in.sh

If you are using solr4, then the java memory options needs to be set in <TomcatInstallDirectory>\bin\catalina.bat or <TomcatInstallDirectory>\bin\catalina.sh

Example:

catalina.bat:

set JAVA_OPTS=%JAVA_OPTS% -Xms1g -Xmx4g

catalina.sh:

JAVA_OPTS=%JAVA_OPTS% -Xms1g -Xmx4g

~Abhinav
(ACSCE, AWS SAA, Azure Admin)