mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-05 22:25:49 +00:00
perf[deploy]: tips of waitInfoLog
This commit is contained in:
@@ -72,7 +72,42 @@ function waitInfoLog() {
|
||||
while true; do
|
||||
infoLog=$(ls ./log | grep info)
|
||||
if [ -z "${infoLog}" ]; then
|
||||
echo "正在等待info.log创建"
|
||||
echo "正在等待info.log创建..."
|
||||
sleep 1
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${infoLog}" ]; then
|
||||
echo "正在等待info.log创建..."
|
||||
sleep 2
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${infoLog}" ]; then
|
||||
echo "正在等待info.log创建..."
|
||||
sleep 3
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${infoLog}" ]; then
|
||||
echo "如果长时间无响应,解决方法1:请检测启动log日志,或者运行目录是否有生成的日志文件"
|
||||
sleep 1
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${infoLog}" ]; then
|
||||
echo "如果长时间无响应,解决方法2:确认jvm参数-Dspring.profiles.active=pro是否正确,是否是你期望的运行环境配置"
|
||||
sleep 1
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${infoLog}" ]; then
|
||||
echo "如果长时间无响应,解决方法3:直接使用命令 java -Dspring.profiles.active=pro -jar xxx.jar"
|
||||
sleep 1
|
||||
else
|
||||
return
|
||||
@@ -204,7 +239,7 @@ function start() {
|
||||
|
||||
# -XX:+AlwaysPreTouch,并置零内存页面,可能令得启动时慢上一点,但后面访问时会更流畅,比如页面会连续分配
|
||||
# 输出到文件 >> output.log 2>&1 &
|
||||
nohup java -XX:InitialHeapSize=1g -XX:MaxHeapSize=1g -XX:MaxMetaspaceSize=256m -XX:AutoBoxCacheMax=20000 -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -Djdk.attach.allowAttachSelf=true -Dspring.profiles.active=pro -Dfile.encoding=UTF-8 -jar ${jarPath} >/dev/null 2>&1 &
|
||||
nohup java -Dspring.profiles.active=pro -XX:InitialHeapSize=1g -XX:MaxHeapSize=1g -XX:AutoBoxCacheMax=20000 -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -Djdk.attach.allowAttachSelf=true -Dfile.encoding=UTF-8 -jar ${jarPath} >/dev/null 2>&1 &
|
||||
|
||||
# 如果没有info的log,则一直等待
|
||||
waitInfoLog
|
||||
|
||||
Reference in New Issue
Block a user