You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ramkumar Aiyengar (JIRA)" <ji...@apache.org> on 2015/05/10 17:14:00 UTC

[jira] [Commented] (SOLR-7506) Roll over GC logs by default via bin/solr scripts

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

Ramkumar Aiyengar commented on SOLR-7506:
-----------------------------------------

bq. Unfortunately, the JDK doesn't have any option to append to existing log instead of overwriting so the latest log is overwritten. Maybe we can have the bin/solr script roll that after the process is killed?

We do backup the last gc log before we start? We probably can change that to roll to the same file name as what the JVM would have done.

That apart, this should probably keep this similar to log4j defaults, i.e. 4 MB, and 9 logs.

This probably also made me think about the way we are probably inconsistent with the number of logs and the log retention policy with the main Solr log. We currently ask log4j to retain 9 logs, but roll over to a timestamped file as well at startup -- that will never be part of the retention policy..

> Roll over GC logs by default via bin/solr scripts
> -------------------------------------------------
>
>                 Key: SOLR-7506
>                 URL: https://issues.apache.org/jira/browse/SOLR-7506
>             Project: Solr
>          Issue Type: Improvement
>          Components: scripts and tools
>            Reporter: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: Trunk, 5.2
>
>
> The Oracle JDK supports rolling over GC logs. I propose to add the following to the solr.in.{sh,cmd} scripts to enable it by default:
> {code}
> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M
> {code}
> Unfortunately, the JDK doesn't have any option to append to existing log instead of overwriting so the latest log is overwritten. Maybe we can have the bin/solr script roll that after the process is killed?



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

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