kennknowles commented on code in PR #37764:
URL: https://github.com/apache/beam/pull/37764#discussion_r2989782241
##########
sdks/java/container/boot.go:
##########
@@ -221,16 +224,18 @@ func main() {
args = append(args, jammAgentArgs)
}
+ enableHeapDumpsOnOom := false
// If heap dumping is enabled, configure the JVM to dump it on oom
events.
if pipelineOptions, ok :=
info.GetPipelineOptions().GetFields()["options"]; ok {
if heapDumpOption, ok :=
pipelineOptions.GetStructValue().GetFields()["enableHeapDumps"]; ok {
- if heapDumpOption.GetBoolValue() {
- args = append(args,
"-XX:+HeapDumpOnOutOfMemoryError",
-
"-Dbeam.fn.heap_dump_dir="+filepath.Join(dir, "heapdumps"),
- "-XX:HeapDumpPath="+filepath.Join(dir,
"heapdumps", "heap_dump.hprof"))
- }
+ enableHeapDumpsOnOom = heapDumpOption.GetBoolValue()
}
}
+ if enableHeapDumpsOnOom {
+ args = append(args, "-XX:+HeapDumpOnOutOfMemoryError",
+ "-Dbeam.fn.heap_dump_dir="+filepath.Join(dir,
"heapdumps"),
Review Comment:
I mean specifically the `-D` parameter which presumably is where Beam would
be putting a heap dump, but we are exiting anyhow and having the JVM do it
(which is hopefully more reliable?)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]