Skip to content

Commit 12d7ec2

Browse files
Add example configuration for rotating GC log (#22715)
By default, the JVM GC log file grows without limitation. This is inconvenient for a long running process like Elasticsearch. With this commit we add an example configuration for a rotating GC log in `conig/jvm.options`.
1 parent 6961ab3 commit 12d7ec2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

distribution/src/main/resources/config/jvm.options

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@
9898
# ensure the directory exists
9999
#-Xloggc:${loggc}
100100

101+
# By default, the GC log file will not rotate.
102+
# By uncommenting the lines below, the GC log file
103+
# will be rotated every 128MB at most 32 times.
104+
#-XX:+UseGCLogFileRotation
105+
#-XX:NumberOfGCLogFiles=32
106+
#-XX:GCLogFileSize=128M
107+
101108
# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
102109
# If documents were already indexed with unquoted fields in a previous version
103110
# of Elasticsearch, some operations may throw errors.

0 commit comments

Comments
 (0)