diff --git a/apollo-adminservice/src/main/scripts/startup.sh b/apollo-adminservice/src/main/scripts/startup.sh index 223b2c004e454feee98f060e03a2baed8b427a27..f75693ca7d87a5e92d80b1f57ee5e19288c2035b 100644 --- a/apollo-adminservice/src/main/scripts/startup.sh +++ b/apollo-adminservice/src/main/scripts/startup.sh @@ -3,6 +3,9 @@ SERVICE_NAME=apollo-adminservice VERSION=0.0.1-SNAPSHOT PATH_TO_JAR=$SERVICE_NAME"-"$VERSION".jar" +export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8" +export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003172/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003172/HeapDumpOnOutOfMemoryError/" + if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then export JAVA_HOME=/usr/java/latest/ fi diff --git a/apollo-configservice/src/main/scripts/startup.sh b/apollo-configservice/src/main/scripts/startup.sh index cafdf8154aa82a67895a015b115f82856e7af599..6e3d79187573dcc11376ae92934391a14d40178c 100644 --- a/apollo-configservice/src/main/scripts/startup.sh +++ b/apollo-configservice/src/main/scripts/startup.sh @@ -3,6 +3,9 @@ SERVICE_NAME=apollo-configservice VERSION=0.0.1-SNAPSHOT PATH_TO_JAR=$SERVICE_NAME"-"$VERSION".jar" +export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8" +export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003171/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003171/HeapDumpOnOutOfMemoryError/" + if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then export JAVA_HOME=/usr/java/latest/ fi diff --git a/apollo-portal/src/main/scripts/startup.sh b/apollo-portal/src/main/scripts/startup.sh index 9c636eafc4b441cc464958faa8bf70caaec8ec09..dccffb2786cadeeca2f0625549c6e80d1351134c 100644 --- a/apollo-portal/src/main/scripts/startup.sh +++ b/apollo-portal/src/main/scripts/startup.sh @@ -3,6 +3,9 @@ SERVICE_NAME=apollo-portal VERSION=0.0.1-SNAPSHOT PATH_TO_JAR=$SERVICE_NAME"-"$VERSION".jar" +export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8" +export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003173/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003173/HeapDumpOnOutOfMemoryError/" + if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then export JAVA_HOME=/usr/java/latest/ fi