Out of memory Error - Solr version 8.11.2

*java -server -Xms32g -Xmx32g -XX:+UseG1GC -XX:+PerfDisableSharedMem
-XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages
-XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent
-Xlog:gc*:file=/var/solr/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M
-Dsolr.jetty.inetaccess.includes= -Dsolr.jetty.inetaccess.excludes=
-Dsolr.log.dir=/var/solr/logs -Djetty.port=8983 -DSTOP.PORT=7983
-DSTOP.KEY=solrrocks -Duser.timezone=UTC -XX:-OmitStackTraceInFastThrow
-XX:OnOutOfMemoryError=/opt/solr/bin/oom_solr.sh 8983 /var/solr/logs
-Djetty.home=/opt/solr/server -Dsolr.solr.home=/var/solr/data
-Dsolr.data.home= -Dsolr.install.dir=/opt/solr
-Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf
-Dlog4j.configurationFile=/var/solr/log4j2.xml
-Dsolr.disable.shardsWhitelist=true -Xss256k -Dsolr.log.muteconsole -jar
start.jar --module=http --module=gzip*


*The  oom_solr.sh file contains the following* -



















*SOLR_PORT=$1SOLR_LOGS_DIR=$2SOLR_PID=$(ps auxww | grep start.jar | grep
$SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r)if [ -z "$SOLR_PID"
]; then  echo "Couldn't find Solr process running on port $SOLR_PORT!"
exitfiNOW=$(date +"%F_%H_%M_%S")(  echo "Running OOM killer script for
process $SOLR_PID for Solr on port $SOLR_PORT"  if [[ "$SOLR_PID" == 1 ]];
then    # Under Docker when running as pid 1, SIGKILL is ignored, so use
the default SIGTERM    kill "$SOLR_PID"  else    # On a real system, or in
a container with tini or similar, it is safe to SIGKILL    kill -9
"$SOLR_PID"  fi  echo "Killed process $SOLR_PID") | tee
$SOLR_LOGS_DIR/solr_oom_killer-$SOLR_PORT-$NOW.log*

Reply via email to