You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2017/12/14 21:30:00 UTC

[jira] [Commented] (SOLR-9168) Add availability to specify own oom handing script

    [ https://issues.apache.org/jira/browse/SOLR-9168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16291643#comment-16291643 ] 

Shawn Heisey commented on SOLR-9168:
------------------------------------

I think that we should not just replace oom_solr.sh with a user-provided script.  Because operation is undefined when OOME strikes, it is my strong opinion that it should always kill Solr, and we cannot assume that a user-provided script is going to do that.

Adding custom user actions would be immensely useful, though.  So, I propose that we allow the user to define a variable with the name/location of an executable (program or script) that will be run by oom_solr.sh after Solr is killed.


> 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
>              Labels: oom
>             Fix For: 5.5.1
>
>         Attachments: 0001-SOLR-9168-Allow-users-to-specify-their-own-OnOutOfMe.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
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org