diff --git a/inlong-agent/bin/agent-env.sh b/inlong-agent/bin/agent-env.sh index 8d00c448430..f726cd698d7 100755 --- a/inlong-agent/bin/agent-env.sh +++ b/inlong-agent/bin/agent-env.sh @@ -49,7 +49,7 @@ if [ -z "$AGENT_JVM_HEAP_OPTS" ]; then else HEAP_OPTS="$AGENT_JVM_HEAP_OPTS" fi -GC_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:InitiatingHeapOccupancyPercent=60 -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8" +GC_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:InitiatingHeapOccupancyPercent=60 -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError" LOG_OPTS="-Xloggc:$BASE_DIR/logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=20M" if [ -n "$NEED_TRACK_NATIVE_MEMORY" ] && [ "$NEED_TRACK_NATIVE_MEMORY" = "true" ]; then GC_OPTS="$GC_OPTS -XX:NativeMemoryTracking"