Skip to content

Commit

Permalink
US-512995: Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PEGA-NarasimhaRao-Meda committed Apr 3, 2024
1 parent 93e78ad commit e7b3b50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/pega/RecommendedJVMArgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This is the Java8+ equivalent of *PermGen* space. This space is unbounded by def
**Flag**: `-Duser.timezone=TIMEZONE`<br>
**Purpose**: Sets the timezone the JVM will use.<br>
**JVM default**: By default, the JVM obtains time zone from the operating system. The Pega docker image is configured to Etc/UTC.<br>
**Pega Recommendation**: Pega requires the JVM timezone to be the same as the timezone used by the database. Set this if your database is not Etc/UTC.
**Pega Recommendation**: Set the JVM time zone to match your database time zone. Set this parameter if your database time zone is not Etc/UTC.

**Flag**: `-XX:+HeapDumpOnOutOfMemoryError` <br>
**Purpose**: Generate a heap dump when an OutOfMemory Occurs.<br>
Expand Down
20 changes: 8 additions & 12 deletions docs/PersistingGarbageCollectionLogsAndHeapDumps.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
Garbage collection logs and heap dumps are written to the pod storage which is ephemeral. When a pod crashes, all the logs and heap dumps stored in the pod are lost. To persist them we can use the following options:
By default, the system saves garbage collection logs and heap dumps in the pod storage, which is ephemeral. When a pod crashes, all logs and heap dumps stored in the pod are lost. You can use one of the following options to persist the data:

### Persist garbage collection logs

Garbage collection logs are like diagnostic tools for application's memory management.
Garbage collection (GC) logs are diagnostic tools for application memory management.

#### 1. To enable GC logging:
Set the appropriate flag (mentioned [here](../charts/pega/RecommendedJVMArgs.md)) within the `javaOpts` parameter in `values.yaml` file.
1. To enable GC logging, set the appropriate flag within the javaOpts parameter in values.yaml. For more information, see [JVM Arguments for better tunability](../charts/pega/RecommendedJVMArgs.md).

#### 2. Persist logs with EFK Stack:
Configure the EFK stack (Elasticsearch-Fluentd-Kibana) to collect and store these GC logs permanently. Refer to the Pega documentation for EFK setup: [EFK logging stack](../charts/addons/README.md#logging-with-elasticsearch-fluentd-kibana-efk).
2. To collect and store GC logs permanently, configure the EFK stack (Elasticsearch-Fluentd-Kibana). For more information, see [EFK logging stack](../charts/addons/README.md#logging-with-elasticsearch-fluentd-kibana-efk).

### Persist heap dumps

When your application runs out of memory (OOM), capturing a heap dump can help in identifying the root cause
When your application runs out of memory (OOM), capturing a heap dump can help in identifying the root cause.

#### 1. To enable automatic heap dumps:
Set the appropriate flag (mentioned [here](../charts/pega/RecommendedJVMArgs.md)) within the `javaOpts` parameter in `values.yaml` file.
1. To enable automatic heap dumps, set the appropriate flag within the `javaOpts` parameter in `values.yaml` file. For more information, see [JVM Arguments for better tunability](../charts/pega/RecommendedJVMArgs.md).

#### 2. Persist heap dumps using persistent volumes:
Configure a persistent storage using Persistent Volumes (PVs) and Persistent Volume Claims (PVCs). Refer this [document](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) to create and use persistent volumes.
2. To persist heap dumps, configure a persistent storage using Persistent Volumes (PVs) and Persistent Volume Claims (PVCs). For more information on persistent volumes, see official [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/).

Include the following configuration snippet for each tier in `values.yaml` file.

Please note that the heap dumps are stored in a predefined location `/heapdumps`. Use the same location as the mount path in your `values.yaml`.
Note: The system stores the heap dumps in a predefined location `/heapdumps`. Use the same location as the mount path in your `values.yaml` file.

```yaml
tier:
Expand Down

0 comments on commit e7b3b50

Please sign in to comment.