[ https://issues.apache.org/jira/browse/SOLR-9168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532241#comment-17532241 ]
Shawn Heisey commented on SOLR-9168: ------------------------------------ I was able to get the combined options working on Linux. It fails to start on Windows ... I need to figure out on Windows how to set the OnOutOfMemoryError option to a value that contains spaces. I am definitely preferring the Crash option ... it wrote a file named hs_err_pid268786.log which contains this: {code:java} # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (debug.cpp:339), pid=268786, tid=268790 # fatal error: OutOfMemory encountered: Java heap space {code} Sometimes OOME is not logged by Solr's logging, and in that situation we can't tell what resource was depleted, and can only guess that it was memory. The Crash option logs it nicely. We don't get the stacktrace, but most of the time that isn't actually helpful anyway. > Add availability to specify own oom handing script > -------------------------------------------------- > > Key: SOLR-9168 > URL: https://issues.apache.org/jira/browse/SOLR-9168 > Project: Solr > Issue Type: Improvement > Components: scripts and tools > Affects Versions: 5.5.1 > Reporter: AngryDeveloper > Priority: Major > Labels: oom > Fix For: 5.5.1 > > Attachments: > 0001-SOLR-9168-Allow-users-to-specify-their-own-OnOutOfMe.patch, > SOLR-9168-userdefined.patch, SOLR-9168.patch > > > Right now the start script always uses $SOLR_TIP/bin/oom_solr.sh to handle > OutOfMemoryException. This script only kills instance of solr. > We need to do some additional things (e.g sent mail about this exception) > What do you think about adding possibility to set up own script? > Proposition: > {code} > if [ -z "$SOLR_OOM_SCRIPT" ]; then > SOLR_OOM_SCRIPT=$SOLR_TIP/bin/oom_solr.sh > fi > [...] > nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS \ > "-XX:OnOutOfMemoryError=$SOLR_OOM_SCRIPT $SOLR_PORT $SOLR_LOGS_DIR" \ > -jar start.jar "${SOLR_JETTY_CONFIG[@]}" \ > 1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid" > {code} -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org