other 增加gc和oom日志

This commit is contained in:
tianfeng 2025-12-16 12:26:15 +08:00
parent d228644efe
commit 21258dee1b

View File

@ -6,9 +6,17 @@ ENV RC_SERVICE_VERSION $SERVICE_VERSION
ENV SERVER_PORT="9000"
ENV SERVER_PROFILE_ACTIVE "prod"
ENV JVM_OPTION "-XX:InitialRAMPercentage=65.0 -XX:MaxRAMPercentage=65.0"
ENV JVM_OPTION "-XX:InitialRAMPercentage=65.0 -XX:MaxRAMPercentage=65.0 \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/application/logs/heapdump-$(date +%Y%m%d-%H%M%S).hprof \
-XX:+PrintGCDetails \
-XX:+PrintGCDateStamps \
-Xloggc:/application/logs/gc-%t.log \
-XX:+UseGCLogFileRotation \
-XX:NumberOfGCLogFiles=5 \
-XX:GCLogFileSize=20M"
RUN mkdir -p /application
RUN mkdir -p /application /logs
WORKDIR application
COPY other-start/target/rc-service-other-*.jar service.jar