-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: fix startup failure of Server1.5.2 by using OpenJDK 11 #4874
Merged
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f8b029e
fix seata_server.sh
robynron e17b806
suport jdk17
robynron e43afc5
fix seata-server.bat
robynron 262c964
fix
robynron 59ee838
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes 4edcaf8
remove CMS args
robynron 7130926
Merge branch 'dev/fix_seata_server.sh' of github.com:robynron/seata i…
robynron 4175b44
add changes
robynron b05a9ab
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes e71f5f6
UseG1GC
robynron 811de01
Merge branch 'dev/fix_seata_server.sh' of github.com:robynron/seata i…
robynron 11a5eb8
resolve conflict
robynron 86dce49
merge with develop
robynron 25c2499
fix basedir
robynron fe13226
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes a82fb0c
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes ac17426
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes 93e8f2f
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes 7650389
Merge branch 'develop' into dev/fix_seata_server.sh
funky-eyes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,13 +128,18 @@ JVM_MaxMetaspaceSize=$JVM_MaxMetaspaceSize | |
JVM_MaxDirectMemorySize=$JVM_MaxDirectMemorySize | ||
LOADER_PATH=$LOADER_PATH | ||
JAVA_OPT="${JAVA_OPT} -server -Dloader.path=${LOADER_PATH:="$BASEDIR/lib"} -Xmx${JVM_XMX:="2048m"} -Xms${JVM_XMS:="2048m"} -Xmn${JVM_XMN:="1024m"} -Xss${JVM_XSS:="512k"} -XX:SurvivorRatio=10 -XX:MetaspaceSize=${JVM_MetaspaceSize:="128m"} -XX:MaxMetaspaceSize=${JVM_MaxMetaspaceSize:="256m"} -XX:MaxDirectMemorySize=${JVM_MaxDirectMemorySize:=1024m} -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy" | ||
JAVA_OPT="${JAVA_OPT} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASEDIR}/logs/java_heapdump.hprof -XX:+DisableExplicitGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75" | ||
JAVA_OPT="${JAVA_OPT} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASEDIR}/logs/java_heapdump.hprof -XX:+DisableExplicitGC" | ||
|
||
JAVA_MAJOR_VERSION=$($JAVACMD -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}' | awk -F '.' '{print $2}') | ||
JAVA_MAJOR_VERSION=$($JAVACMD -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}' | awk -F '.' '{print $1}') | ||
if [[ "$JAVA_MAJOR_VERSION" -eq "1" ]] ; then | ||
JAVA_MAJOR_VERSION=$($JAVACMD -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}' | awk -F '.' '{print $2}') | ||
slievrly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi | ||
if [[ "$JAVA_MAJOR_VERSION" -ge "9" ]] ; then | ||
JAVA_OPT="${JAVA_OPT} -Xlog:gc*:file=${BASEDIR}/logs/seata_gc.log:time,tags:filecount=10,filesize=102400" | ||
elif [[ "$JAVA_MAJOR_VERSION" -ge "17" ]] ; then | ||
JAVA_OPT="${JAVA_OPT} -Xlog:gc=trace:file=${BASEDIR}/logs/seata_gc.log:time,tags:filecount=10,filesize=10M" | ||
else | ||
JAVA_OPT="${JAVA_OPT} -Xloggc:${BASEDIR}/logs/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我建议不要用cms任何参数,不要使用cmsgc |
||
JAVA_OPT="${JAVA_OPT} -Xloggc:${BASEDIR}/logs/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:+UseG1GC" | ||
fi | ||
|
||
JAVA_OPT="${JAVA_OPT} -Dio.netty.leakDetectionLevel=advanced" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the CMS parameter? What are the GC types and default parameters for different JDK versions?
为什么去掉CMS参数,不同的JDK版本对应的GC类型和默认参数是啥?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gc类型应该交给jdk默认或者用户侧指定,通过${JAVA_OPT}
@slievrly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker image should be out of the box.