Skip to content

Commit 758946c

Browse files
committed
[SPARK-52645] Enable ExitOnOutOfMemoryError JVM option by default
### What changes were proposed in this pull request? This Pr aims to enable `ExitOnOutOfMemoryError` JVM option by default. ### Why are the changes needed? To help users identify the problematic situation as earlier as possible. ### Does this PR introduce _any_ user-facing change? Yes, but OOM should not be ignored. After this PR, the JVM will exit on the first `OutOfMemoryError` it encounters, terminating the process with exit code 3. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#266 from dongjoon-hyun/SPARK-52645. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 7cb737f commit 758946c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build-tools/helm/spark-kubernetes-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ operatorDeployment:
4141
# https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
4242
topologySpreadConstraints: [ ]
4343
operatorContainer:
44-
jvmArgs: "-Dfile.encoding=UTF8"
44+
jvmArgs: "-Dfile.encoding=UTF8 -XX:+ExitOnOutOfMemoryError"
4545
env:
4646
- name: "SPARK_USER"
4747
value: "spark"

docs/operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ following table:
7676
| operatorDeployment.operatorPod.volumes | Additional volumes to be added to the operator pod. | |
7777
| operatorDeployment.operatorPod.priorityClassName | Priority class name to be used for the operator pod | |
7878
| operatorDeployment.operatorPod.securityContext | Security context overrides for the operator pod | |
79-
| operatorDeployment.operatorContainer.jvmArgs | JVM arg override for the operator container. | `"-Dfile.encoding=UTF8"` |
79+
| operatorDeployment.operatorContainer.jvmArgs | JVM arg override for the operator container. | `"-Dfile.encoding=UTF8 -XX:+ExitOnOutOfMemoryError"` |
8080
| operatorDeployment.operatorContainer.env | Custom env to be added to the operator container. | |
8181
| operatorDeployment.operatorContainer.envFrom | Custom envFrom to be added to the operator container, e.g. for downward API. | |
8282
| operatorDeployment.operatorContainer.probes | Probe config for the operator container. | |

0 commit comments

Comments
 (0)