Article - CS227284

Working With Java Heap Space Errors in ThingWorx Platform

Modified: 17-Apr-2020   

Applies To

  • ThingWorx Platform 6.5 to 8.5
  • Apache Tomcat
  • PostgreSQL
  • Microsoft Windows
  • Linux

Description

  • Data import failing with Error in <ThingworxStorage>\logs\Applicationlog.Log
    • Error importing: error, Java heap space
  • Error retrieving a lot of data from a PostgreSQL external database
  • Java Heap Space error retrieving large amounts of data from external database
  • ThingWorx is starting but after some time it is freezing
    • Error in <ThingworxStorage>\logs\ErrorLog.log:
      • java.lang.OutOfMemoryError: Java heap space
  • ThingWorx fails to start with an out of memory error in <ThingworxStorage>\logs\Applicationlog.Log
    • Commons Daemon procrun stdout initialized
      Error occurred during initialization of VM
      Could not reserve enough space for <xxxxx>KB object heap
    • java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Metaspace
  • ThingWorx services fail to execute and the ThingWorx Platform becomes slow or inaccessible:
    • Following errors noted in <ThingworxStorage>\logs\ScriptLog.log
      • [L: ERROR] [O: S.c.t.d.e.DSLProcessor] [I: ] [U: <User>] [S: ] [T: http-nio-8443-exec-<Thread Number>] Execution error in service script [<Entity> <Service>] : Wrapped java.lang.Exception: Java heap space Cause: Java heap space
      • All subsequent service calls show:
        • [L: ERROR] [O: S.c.t.d.e.DSLProcessor] [I: ] [U: <User>] [S: ] [T: http-nio-8443-exec-<Thread Number>] Execution error in service script [<Entity> <Service>] : Wrapped com.thingworx.common.exceptions.InvalidRequestException: Execution error in service script [<Entity> <Service>] : Wrapped java.lang.Exception: Java heap space Cause: Java heap space Cause: Execution error in service script [<Entity> <Service>] : Wrapped java.lang.Exception: Java heap space Cause: Java heap space
  • Tomcat fails to start with error in <Tomcat Install>\logs\catalina.<date>.log:
    • SEVERE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployWARs Error waiting for multi-thread deployment of WAR files to complete
       java.lang.InterruptedException
          at java.util.concurrent.FutureTask.awaitDone(Unknown Source)
          at java.util.concurrent.FutureTask.get(Unknown Source)
          at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:733)...
This is a PDF version of Article CS227284 and may be out of date. For the latest version click here