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

2017-12-14 Thread Tyler Lubeck (JIRA)

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

Tyler Lubeck commented on SOLR-9168:


[~erickerickson] had asked on my initial email thread if this was needed for 
the Windows scripts - I've done some digging and nothing of this nature appears 
to be setup for solr.cmd so I think we're good, but perhaps we consider adding 
an oom_solr.cmd script to match what's set up for non-windows?

> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2017-12-14 Thread Tyler Lubeck (JIRA)

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

Tyler Lubeck commented on SOLR-9168:


Oooh ok I like that a lot. What do you think of something like this:

1. Change the startup command 
[here|https://github.com/apache/lucene-solr/blob/7974aa033c7985b4d0dde92776b12ee50aa9ee5c/solr/bin/solr#L2019]
 to instead say something like 
{{-XX:-XX:OnOutOfMemoryError='USER_SCRIPT=$SOLR_OOM_SCRIPT 
$SOLR_TIP/bin/oom_solr.sh'}}
2. Add docs and examples to set {{SOLR_OOM_SCRIPT}} in solr.in.sh
3. Append something like {{[[ -z $USER_SCRIPT]] && exec $USER_SCRIPT}} to the 
end of the existing oom_solr.sh script

I'm trying to think of ways to get a custom user variables from solr.in.sh over 
to oom_solr.sh. That said, I haven't tested this yet and am totally up for 
better suggestions. 

Alongside that, are there any values we can provide to a custom OOM script that 
might be useful for custom user actions? If so, should we route them as 
arguments or on stdin?

> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2017-11-15 Thread Tyler Lubeck (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-9168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Lubeck updated SOLR-9168:
---
Attachment: 0001-SOLR-9168-Allow-users-to-specify-their-own-OnOutOfMe.patch
SOLR-9168.patch

Hi! This is something that I just ran across needing in my own work, and I 
figured I'd give it a shot. I wanted to submit the actual change early, while I 
hunt around to figure out where any documentation is that may need updating

> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org