From af2bce9ee1a68ee2becc6a48cde12218bbafcd00 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 6 Aug 2015 15:26:11 +0000 Subject: [PATCH] SOLR-7831: Start Scripts: Allow a configurable stack size [-Xss] git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1694523 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 6 +++++- solr/bin/solr | 2 +- solr/bin/solr.cmd | 4 ++-- solr/bin/solr.in.cmd | 5 ++++- solr/bin/solr.in.sh | 3 +++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index f3902953f49..620a4f161c4 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -72,7 +72,11 @@ Other Changes (Xu Zhang, Per Steffensen, Ramkumar Aiyengar, Mark Miller) ================== 5.4.0 ================== -(No Changes) + +Other Changes +---------------------- + +* SOLR-7831: Start Scripts: Allow a configurable stack size [-Xss] (Steve Davids via Mark Miller) ================== 5.3.0 ================== diff --git a/solr/bin/solr b/solr/bin/solr index c0a84e65f17..7a632b23a02 100755 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -1289,7 +1289,7 @@ function launch_solr() { exit 1 fi - SOLR_START_OPTS=('-server' '-Xss256k' "${JAVA_MEM_OPTS[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" \ + SOLR_START_OPTS=('-server' "${JAVA_MEM_OPTS[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" \ "${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" \ "-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \ "${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" \ diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd index b6cd308109c..0cef348dbda 100644 --- a/solr/bin/solr.cmd +++ b/solr/bin/solr.cmd @@ -884,10 +884,10 @@ IF "%FG%"=="1" ( REM run solr in the foreground title "Solr-%SOLR_PORT%" echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port - "%JAVA%" %SERVEROPT% -Xss256k %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ + "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" ) ELSE ( - START /B "Solr-%SOLR_PORT%" /D "%SOLR_SERVER_DIR%" "%JAVA%" %SERVEROPT% -Xss256k %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ + START /B "Solr-%SOLR_PORT%" /D "%SOLR_SERVER_DIR%" "%JAVA%" %SERVEROPT% %SOLR_JAVA_MEM% %START_OPTS% %GCLOG_OPT%:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^ -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" > "!SOLR_LOGS_DIR!\solr-%SOLR_PORT%-console.log" echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port diff --git a/solr/bin/solr.in.cmd b/solr/bin/solr.in.cmd index e97e0b29687..0b299af2890 100644 --- a/solr/bin/solr.in.cmd +++ b/solr/bin/solr.in.cmd @@ -66,6 +66,9 @@ set ENABLE_REMOTE_JMX_OPTS=false REM The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here REM set RMI_PORT=18983 +REM Set the thread stack size +set SOLR_OPTS=%SOLR_OPTS% -Xss256k + REM Anything you add to the SOLR_OPTS variable will be included in the java REM start command line as-is, in ADDITION to other options. If you specify the REM -a option on start script, those options will be appended as well. Examples: @@ -93,5 +96,5 @@ REM Uncomment if you want to override previously defined SSL values for HTTP cli REM otherwise keep them commented and the above values will automatically be set for HTTP clients REM set SOLR_SSL_CLIENT_KEY_STORE= REM set SOLR_SSL_CLIENT_KEY_STORE_PASSWORD= -REM setSOLR_SSL_CLIENT_TRUST_STORE= +REM set SOLR_SSL_CLIENT_TRUST_STORE= REM setSOLR_SSL_CLIENT_TRUST_STORE_PASSWORD= \ No newline at end of file diff --git a/solr/bin/solr.in.sh b/solr/bin/solr.in.sh index b55552fa9c4..150f6c277d3 100644 --- a/solr/bin/solr.in.sh +++ b/solr/bin/solr.in.sh @@ -68,6 +68,9 @@ ENABLE_REMOTE_JMX_OPTS="false" # The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here # RMI_PORT=18983 +# Set the thread stack size +SOLR_OPTS="$SOLR_OPTS -Xss256k" + # Anything you add to the SOLR_OPTS variable will be included in the java # start command line as-is, in ADDITION to other options. If you specify the # -a option on start script, those options will be appended as well. Examples: