Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
Changing the JVM max size for config tools
Solution:
When using the Spotfire Server Configuration tool (commandline or web interface) to do larger tasks (large LDAP sync, export-library-content, find-analysis-scripts), the size of the JVM might be too small and you may receive java.lang.OutOfMemoryError.
The maximum JVM size is set by either the parameter -Xmx or JvmMx depending on where it is is set.
There are several different places this can be set but at the end it depends on where the parameter on the final java command line is read.
For e.g. 10.3 these are the command lines for the config tools:
Windows
tomcat\spotfire-bin\config.bat"%JAVA_HOME%\bin\java" -Xms256m -Xmx4096m -classpath "%CLASSPATH%" -Dcatalina.base="%TSS_HOME%" -Dlog.dir="%TSS_HOME%\logs" -Dlog4j.configurationFile="%TSS_HOME%\spotfire-config\log4j2-tools.xml" com.spotfire.server.config.tool.ConfigApp %*tomcat\spotfire-bin\uiconfig.bat
start "TSS Configuration UI" "%JAVA_HOME%\bin\javaw" -Xms256m -Xmx4096m -classpath "%CLASSPATH%" -Dcatalina.base="%TSS_HOME%" -Dlog.dir="%TSS_HOME%\logs" -Dlog4j.configurationFile="%TSS_HOME%\spotfire-config\log4j2-tools.xml" com.spotfire.server.tools.confui.ConfigurationMain %*
Linux
tomcat/spotfire-bin/config.shexec "$JAVA_HOME/bin/java" -Xms256m -Xmx4096m -classpath "$CLASSPATH" \ -Dcatalina.base="$TSS_HOME" \ -Dlog.dir="$TSS_HOME"/logs \ -Dlog4j.configurationFile="$TSS_HOME"/spotfire-config/log4j2-tools.xml \ com.spotfire.server.config.tool.ConfigApp ${1+"$@"}tomcat/spotfire-bin/uiconfig.sh
exec "$JAVA_HOME/bin/java" -Xms256m -Xmx4096m -classpath "$CLASSPATH" \ -Dcatalina.base="$TSS_HOME" \ -Dlog.dir="$TSS_HOME"/logs \ -Dlog4j.configurationFile="$TSS_HOME"/spotfire-config/log4j2-tools.xml \ com.spotfire.server.tools.confui.ConfigurationMain ${1+"$@"}
As seen in bold, all four of these are having the -Xmx set directly on the command line, which means that you set these values directly in these files and not in the setup files for the Spotfire Server environment (setenv and service.bat).
This article is based on version Spotfire Sever v 10.3 and other releases than 10.3 might be slightly different. However, the start for finding where the JVM options is set always starts on the command line from where you start the java (e.g. if there is a $JAVA_OPTS on the line you needs to find where that variable is set).
Comments
0 comments
Article is closed for comments.