| Product | Version |
| Spotfire (TERR & Python Services) | All supported versions (procedure applies to service config) |
Keywords:
TERR, Python service, custom.properties, JavaOptions, -Xms, -Xmx, OutOfMemoryError, JVM options
Introduction: This KB explains how to update Java VM options for Spotfire TERR and Python services by editing the service custom.properties file. The focus is on adding or adjusting the JavaOptions setting (for example -Xms and -Xmx) to prevent memory-related failures such as OutOfMemoryError: unable to create native thread and CreateProcess error=8.
Symptoms/Example Errors:
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reachedjava.io.IOException: Cannot run program "...jdk\bin\java": CreateProcess error=8, Not enough memory resources are available to process this command- Service shuts down or fails to spawn new engine processes.
Scope: Applies to configuring the Spotfire TERR service and the Spotfire Python service via their exported custom.properties configuration. See the product-specific docs for additional context:
- Managing Java Options — Spotfire Python Service (example)
- Managing Java Options — TERR Service (example)
Solution:
-
Locate the service configuration (custom.properties)
Identify the
custom.propertiesfile for the service you want to modify. The typical path after exporting a configuration is:<server installation dir>/tomcat/spotfire-bin/config/root/conf/<deployment area>/<config-name>/custom.properties
If you do not have a
custom.propertiesfile yet, export the service configuration using the Spotfireconfig export-service-configcommand for the appropriate capability (TERR or PYTHON), then edit the exported file. -
Edit the
custom.propertiesfile to add JavaOptionsOpen
custom.propertiesin a plain-text editor and add or update theJavaOptionsentry. Example:JavaOptions: -Xms2g,-Xmx4g
Notes:
- No surrounding quotes are required—enter the options exactly as shown.
- Multiple JVM options are comma-separated, as in the example.
- Adjust values to match available system memory and expected workload. Example starting ranges:
- Light workloads:
-Xms512m,-Xmx1g - Medium workloads:
-Xms2g,-Xmx4g - Heavy workloads:
-Xms4g,-Xmx8g
- Light workloads:
- Do not set
-Xmxhigher than available physical memory minus what other processes require.
-
Save, import configuration, and apply to service
After saving the edited
custom.propertiesfile, import the configuration back into Spotfire and apply it to the service. Example command:config import-service-config --capability=<TERR or PYTHON> --deployment-area=<your deployment area name> --file=<path to custom.properties>
After a successful import, restart the corresponding service so the new JVM options take effect (service restart is required for JVM options).
Comments
0 comments
Please sign in to leave a comment.