Product |
Version |
SERR/TERR/Opensource R/Python |
All Versions |
Keywords:
SEER/TERR/Opensource R/Python Services, install packages, versions, library paths, Spotfire Service for TERR/Opensource R.
Introduction: SEER/TERR/Opensource R/Python Services users may occasionally encounter a Java OutOfMemoryError, particularly when initializing the engine. This article outlines the error and provides a step-by-step solution to resolve it.
The Error: The following error message may appear in the logs:
ERROR 2024-08-06T06:13:37,264-0400 [EQH-engineInitialization] topology.engine.EngineQueueHandler: An exception happened when creating a new engine: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
This error suggests that the Java Virtual Machine (JVM) is unable to allocate more memory for creating new threads, likely due to reaching system limits or insufficient available memory.
The Solution:
To resolve this issue, we need to adjust the Java heap memory settings for the TERR service. Here's how:
- Export the custom.properties file: Use the following command to export the current service configuration:
config export-service-config
For more details on this step, refer to the TIBCO documentation: https://docs.tibco.com/pub/terrsrv/1.21.0/doc/html/TIB_terrsrv_install/_shared/install/topics/configuring_the_service.html
- Modify the custom.properties file: Add the following line to the exported custom.properties file:
JavaOptions:-Xms2g,-Xmx4g
This sets the initial heap size (-Xms) to 2GB and the maximum heap size (-Xmx) to 4GB. Adjust these values as needed based on your system's available resources. - Import the modified configuration: Use the following command to import the updated custom.properties file:
config import-service-config --config-name=<new-config-name>
Replace <new-config-name> with a descriptive name for your new configuration. - Apply the new configuration: Restart the TERR service to apply the new memory settings.
Conclusion:
By increasing the Java heap memory allocation for the SERR/TERR/Opensource R/Python service, you should be able to resolve the OutOfMemoryError and successfully initialize the engine. If the problem persists, consider further increasing the memory allocation or investigating other potential resource constraints on your system. Remember to monitor your system's performance after making these changes to ensure optimal operation.
Comments
0 comments
Please sign in to leave a comment.