Skip to content

Commit fa5cebb

Browse files
Add exit_on_oom=true (#744)
1 parent e27bad3 commit fa5cebb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/spec/common.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ func renderPythonInstanceLoggingINITemplate(name string, runtime *v1alpha1.Pytho
10251025
lc.Policy = template.HTML(fmt.Sprintf(`[handler_timed_rotating_file_handler]
10261026
args=(\"%s\", 'D', 1, 5,)
10271027
class=handlers.TimedRotatingFileHandler
1028-
level=%s
1028+
level=%s
10291029
formatter=formatter`, logFile, lc.Level))
10301030
case v1alpha1.TimedPolicyWithWeekly:
10311031
lc.Handlers = "stream_handler,timed_rotating_file_handler"
@@ -1186,11 +1186,13 @@ func getProcessJavaRuntimeArgs(name, packageName, clusterName, logLevel, details
11861186
fmt.Sprintf("-Dlog4j.configurationFile=%s", javaLogConfigPath),
11871187
"-Dpulsar.function.log.dir=logs/functions",
11881188
"-Dpulsar.function.log.file=" + fmt.Sprintf("%s-${%s}", name, EnvShardID),
1189+
"-Dpulsar.allocator.exit_on_oom=true",
11891190
setLogLevel,
11901191
"-XX:MaxRAMPercentage=40",
11911192
"-XX:+UseG1GC",
11921193
"-XX:+HeapDumpOnOutOfMemoryError",
11931194
"-XX:HeapDumpPath=/pulsar/tmp/heapdump-%p.hprof",
1195+
"-XX:+ExitOnOutOfMemoryError",
11941196
"-Xlog:gc*:file=/pulsar/logs/gc.log:time,level,tags:filecount=5,filesize=10M",
11951197
strings.Join(javaOpts, " "),
11961198
"org.apache.pulsar.functions.instance.JavaInstanceMain",

0 commit comments

Comments
 (0)