2024-10-08 09:38:54 +08:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
#
|
|
|
|
|
|
# 抖音关注:程序员三丙
|
|
|
|
|
|
# 知识星球:https://t.zsxq.com/j9b21
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
echo "Starting Server ..."
|
|
|
|
|
|
|
|
|
|
|
|
export JAVA_APP_OPTS="-XX:+UseContainerSupport -XX:InitialRAMPercentage=10 -XX:MaxRAMPercentage=70 \
|
|
|
|
|
|
-Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/sanbing/gc/gc.log:time,uptime,level,tags:filecount=10,filesize=10M \
|
|
|
|
|
|
-XX:+HeapDumpOnOutOfMemoryError \
|
|
|
|
|
|
-XX:HeapDumpPath=/var/log/sanbing/heapdump/ \
|
|
|
|
|
|
-XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark \
|
|
|
|
|
|
-XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10 \
|
2024-10-25 09:49:24 +08:00
|
|
|
|
-Xss512k -XX:MaxDirectMemorySize=256M -XX:G1ReservePercent=20 \
|
2024-10-08 09:38:54 +08:00
|
|
|
|
-XX:-OmitStackTraceInFastThrow \
|
|
|
|
|
|
-Dlogging.config=/app/config/log4j2.xml"
|
|
|
|
|
|
|
|
|
|
|
|
#export JAVA_OPTS_EXTEND="-Xdebug -Xrunjdwp:transport=dt_socket,address=0.0.0.0:8000,server=y,suspend=n"
|
|
|
|
|
|
|
|
|
|
|
|
exec java $JAVA_APP_OPTS $JAVA_OPTS_EXTEND $JAVA_OPTS -Dnetworkaddress.cache.ttl=60 -jar /app/application.jar
|