Skip to content

DOC-476-GC: updates for GC logging support ticket #1717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 33 additions & 16 deletions docs/modules/troubleshoot/pages/remedies-for-alerts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:description: Find advice for remedies for the Hazelcast alerts.

When an alert fires on a Hazelcast cluster member,
its important to gather as much data about the ailing
it's important to gather as much data about the ailing
member as possible to take the suitable action. For this,
you can use the following options.

Expand All @@ -27,24 +27,41 @@ You can also enable GC logging settings as shown below in your JVM options confi

[source,plain]
----
-verbose:gc
-Xloggc:gc.log
-XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=10M
-XX:+UseGCLogFileRotation
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationConcurrentTime
-XX:+PrintGCApplicationStoppedTime
-Xlog:gc*,gc+age=trace,safepoint:file=/path/to/gc.log:time,uptime,level,tags:filecount=10,filesize=10M
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/path/to/heapdumps
----

You can use the following parameter to specify the location for the GC log file:
These settings are explained in the table below:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good, but I think we need to call out where users need to do something - make a decision, provide information etc. - as opposed to just copying and pasting the config as provided. At a glance, it looks like you need to specify a filepath, and the log rotation settings (10 x 10 MB) might be something you'd change. Is this set of config just an example, a recommendation, or mandatory? Do we have any guidance?

Copy link
Contributor Author

@amandalindsay amandalindsay May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good questions but both SMEs on this ticket have left so will need to track down another. And, the example in the ticket adds nothing to what's in the table

[source,plain]
----
-Xloggc:/path/to/your/log/directory/gc.log
----
[cols="50%,50%"]
|===
|Parameter |Description

|-Xlog:gc*
|Enables all GC logging at the default info level

|gc+age=trace
|Adds detailed information about object tenuring and aging

|safepoint
|Logs safepoint events related to application pauses

|file=/path/to/gc.log
|Specifies the log file location

|time,uptime,level,tags
|Includes timestamps, JVM uptime, log levels, and tags in log entries

|filecount=10,filesize=10M
|Sets up log rotation with 10 files of 10 MB each

|-XX:+HeapDumpOnOutOfMemoryError
|Generates a heap dump on OutOfMemoryError

|-XX:HeapDumpPath=/path/to/heapdumps
|Specifies the directory for heap dumps
|===

The JVM options configuration file (`jvm.options`) is located under the `config/` directory
of your Hazelcast distribution. See the xref:configuration:jvm-parameters.adoc[Configuring JVM parameters section] for more information on JVM configuration.
Expand Down