You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2018/01/17 20:46: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=16329438#comment-16329438 ]
Erick Erickson commented on SOLR-9168:
--------------------------------------
Waking this up after a while....
As of Java 8u92, there's a couple of new options:
- *ExitOnOutOfMemoryError*
- *CrashOnOutOfMemoryError*
See: [https://bugs.openjdk.java.net/browse/JDK-8152669]
What do people think about changing how this works? It would require requiring at least u92 for it all to work, but since we're up to 151 I don't think that's onerous. If it's an earlier version the option will just be ignored anyway. The proposal then becomes:
1> Enable ExitOnOutOfMemoryError by default
2> Go ahead and leave oom_solr.sh as the default file, just make it a placeholder (comment-only) file. People can add whatever they want in there as one option.
3> It's still a good idea to let the script used be specified (optionally) by an environment variable, for instance when I'm troubleshooting I could easily want to invoke different oom scripts on different runs.
4> Go ahead and add both options to foreground too.
If users go in and take out the ExitOnOutOfMemoryError they can, although we'll _strongly_ discourage that, Shawn's comment is well taken.
This hinges on our willingness to require 8u92, although this option would probably be ignored if run on earlier versions.
Opinions?
> 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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org