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

Shawn Heisey commented on SOLR-8232:
------------------------------------

[~thelabdude],

In preparation for handling GC log rotation, I am looking at the start scripts. 
 The code handling GC_LOG_OPTS in the shell script seems odd to me:

{code}
if [ "$GC_LOG_OPTS" != "" ]; then
  gc_log_flag="-Xloggc"
  if [ "$JAVA_VENDOR" == "IBM J9" ]; then
    gc_log_flag="-Xverbosegclog"
  fi
  GC_LOG_OPTS=($GC_LOG_OPTS "$gc_log_flag:$SOLR_LOGS_DIR/solr_gc.log")
else
  GC_LOG_OPTS=()
fi
{code}

This allows the following construct to disable GC logging, which is very cool:

{code}
export GC_LOG_OPTS=
{code}

But if you instead want to *entirely override* the logging options, the start 
script will include your options as well as the built-in option that enables GC 
logging.  The built-in options are included last, so I *think* user-provided 
options may not do what was intended.

Also, if I read the code right, then if GC_LOG_OPTS is not defined at all when 
the quoted code block is reached, GC logging is disabled.  As long as users 
don't mess with any of the scripts this isn't really a problem, but I believe 
the docs do encourage people to edit the ${SOLR_HOME}/solr.in script.


> bin/solr does not rotate console log file
> -----------------------------------------
>
>                 Key: SOLR-8232
>                 URL: https://issues.apache.org/jira/browse/SOLR-8232
>             Project: Solr
>          Issue Type: Bug
>          Components: scripts and tools
>    Affects Versions: 5.3
>            Reporter: Upayavira
>            Priority: Minor
>
> The bin/solr script, when started with bin/solr start, uses this command to 
> start Solr:
> {code} nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar \
>         "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT 
> $SOLR_LOGS_DIR" "${SOLR_JETTY_CONFIG[@]}" \
>         1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > 
> "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
> {code}
> This sends console output to stdout, with no means of rotating the log file, 
> meaning it will eventually fill the drive unless restarted.
> I would propose that stdout be written to dev/null and we use proper means 
> for handling logging, which can do proper log rotation as configured by the 
> user.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to