Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build/build-bifromq-starter/bin/bifromq-start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ if not exist "%LOG_DIR%" (
mkdir "%LOG_DIR%"
)

rem Heap dump directory to use
if "" == "%HEAP_DUMP_DIR%" set HEAP_DUMP_DIR=%LOG_DIR%
rem create heap dump directory
if not exist "%HEAP_DUMP_DIR%" (
mkdir "%HEAP_DUMP_DIR%"
)

rem data directory to use
if "" == "%DATA_DIR%" set DATA_DIR=%BASE_DIR%\data
rem create data directory
Expand Down Expand Up @@ -131,7 +138,7 @@ if "" == "%JVM_GC_OPTS%" (
'-XX:+UseZGC' ^
'-XX:ZAllocationSpikeTolerance=5' ^
'-XX:+HeapDumpOnOutOfMemoryError' ^
'-XX:HeapDumpPath="%LOG_DIR%"' ^
'-XX:HeapDumpPath=%HEAP_DUMP_DIR%' ^
'-Xlog:async' ^
'-Xlog:gc:file="%LOG_DIR%\gc.log:time,tid,tags:filecount=5,filesize=50m"'
)
Expand Down
8 changes: 7 additions & 1 deletion build/build-bifromq-starter/bin/bifromq-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ if [ "x$LOG_DIR" = "x" ]; then
fi
mkdir -p "$LOG_DIR"

# Heap dump directory to use, default is log directory
if [ "x$HEAP_DUMP_DIR" = "x" ]; then
HEAP_DUMP_DIR="$LOG_DIR"
fi
mkdir -p "$HEAP_DUMP_DIR"

# Data directory to use
if [ "x$DATA_DIR" = "x" ]; then
DATA_DIR="$BASE_DIR/data"
Expand Down Expand Up @@ -156,7 +162,7 @@ if [ -z "$JVM_GC_OPTS" ]; then
-Xlog:gc:file='${LOG_DIR}/gc-%t.log:time,tid,tags:filecount=5,filesize=50m' \
-XX:+CrashOnOutOfMemoryError \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath='${LOG_DIR}' \
-XX:HeapDumpPath=${HEAP_DUMP_DIR} \
"
fi

Expand Down
Loading