You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/01/28 17:26:14 UTC

[GitHub] [lucene-solr] madrob opened a new pull request #2263: SOLR-14978 OOM Killer in Foreground (#2055)

madrob opened a new pull request #2263:
URL: https://github.com/apache/lucene-solr/pull/2263


   Combine Docker and bin/solr OOM handling scripts, move OOM handling to foreground Solr as well.
   
   Co-authored-by: Houston Putman <ho...@gmail.com>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] cpoerschke commented on a change in pull request #2263: SOLR-14978 OOM Killer in Foreground (#2055)

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on a change in pull request #2263:
URL: https://github.com/apache/lucene-solr/pull/2263#discussion_r568436589



##########
File path: solr/bin/solr
##########
@@ -2115,6 +2128,15 @@ function start_solr() {
     SOLR_OPTS+=($AUTHC_OPTS)
   fi
 
+  # If a heap dump directory is specified, enable it in SOLR_OPTS
+  if [[ -z "$SOLR_HEAP_DUMP_DIR" ]] && [[ "$SOLR_HEAP_DUMP" == "true" ]]; then
+    SOLR_HEAP_DUMP_DIR="${SOLR_LOGS_DIR}/dumps"
+  fi
+  if [[ -n "$SOLR_HEAP_DUMP_DIR" ]]; then
+    SOLR_OPTS+=("-XX:+HeapDumpOnOutOfMemoryError")
+    SOLR_OPTS+=("-XX:HeapDumpPath=$SOLR_HEAP_DUMP_DIR/solr-$(date +%s)-pid$$.hprof")

Review comment:
       How about also optionally supporting customisation of the file name e.g. via a `SOLR_HEAP_DUMP_FILE` variable? Reasons users might wish to customise:
   * inclusion of `SOLR_PORT` in the file name to more easily differentiate dumps for different Solr instances on the same machine
   * preference of (say) `date -u '+%Y%m%d-%H%M%S'` over `date +%s` for the timestamp
   * always use the same dump file as a way to limit the amount of disk space successive OOMs can use up (a colleague of mine had this insight)
   * omission of the pid and restriction of the timestamp e.g. to `date -u '+%Y%m%d'` so that at most one OOM file per day would exist
   * omission of the pid to avoid confusion when running in the background (because the the pid would be that of the shell script and not that of the Solr JVM, I think)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] markrmiller commented on pull request #2263: SOLR-14978 OOM Killer in Foreground (#2055)

Posted by GitBox <gi...@apache.org>.
markrmiller commented on pull request #2263:
URL: https://github.com/apache/lucene-solr/pull/2263#issuecomment-770041322


   Sorry @madrob, didn't mean to get those wip commits in the dev branch, they were meant to go another branch for testing.
   
   Can you update this? Sorry about the hassle.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] HoustonPutman commented on a change in pull request #2263: SOLR-14978 OOM Killer in Foreground (#2055)

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on a change in pull request #2263:
URL: https://github.com/apache/lucene-solr/pull/2263#discussion_r566275295



##########
File path: solr/docker/Dockerfile
##########
@@ -54,7 +54,7 @@ ARG SOLR_VERSION
 # Used by solr-fg
 ENV SOLR_VERSION $SOLR_VERSION
 
-COPY --from=input /opt/solr-$SOLR_VERSION /opt/solr-$SOLR_VERSION
+COPY --from=input /opt/solr-$SOLR_VERSION /opt/solr-$SOLR_VERSION.tgz

Review comment:
       merging mistake. This shouldn't be changed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] madrob closed pull request #2263: SOLR-14978 OOM Killer in Foreground (#2055)

Posted by GitBox <gi...@apache.org>.
madrob closed pull request #2263:
URL: https://github.com/apache/lucene-solr/pull/2263


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] cpoerschke commented on a change in pull request #2263: SOLR-14978 OOM Killer in Foreground (#2055)

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on a change in pull request #2263:
URL: https://github.com/apache/lucene-solr/pull/2263#discussion_r568436589



##########
File path: solr/bin/solr
##########
@@ -2115,6 +2128,15 @@ function start_solr() {
     SOLR_OPTS+=($AUTHC_OPTS)
   fi
 
+  # If a heap dump directory is specified, enable it in SOLR_OPTS
+  if [[ -z "$SOLR_HEAP_DUMP_DIR" ]] && [[ "$SOLR_HEAP_DUMP" == "true" ]]; then
+    SOLR_HEAP_DUMP_DIR="${SOLR_LOGS_DIR}/dumps"
+  fi
+  if [[ -n "$SOLR_HEAP_DUMP_DIR" ]]; then
+    SOLR_OPTS+=("-XX:+HeapDumpOnOutOfMemoryError")
+    SOLR_OPTS+=("-XX:HeapDumpPath=$SOLR_HEAP_DUMP_DIR/solr-$(date +%s)-pid$$.hprof")

Review comment:
       How about also optionally supporting customisation of the file name e.g. via a `SOLR_HEAP_DUMP_FILE` variable? Reasons users might wish to customise:
   * inclusion of `SOLR_PORT` in the file name to more easily differentiate dumps for different Solr instances on the same machine
   * preference of (say) `date -u '+%Y%m%d-%H%M%S'` over `date +%s` for the timestamp
   * always use the same dump file as a way to limit the amount of disk space successive OOMs can use up (a colleague of mine had this insight)
   * omission of the pid and restriction of the timestamp e.g. to `date -u '+%Y%m%d'` so that at most one OOM file per day would exist
   * omission of the pid to avoid confusion when running in the background (because the the pid would be that of the shell script and not that of the Solr JVM, I think)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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