Article - CS344485

When using ThingWorx Java SDK with WebSocket compression turned ON devices are stuck in perpetual connect-disconnects loop with ThingWorx Platform

Modified: 30-Jun-2021   


Applies To

  • ThingWorx Platform 8.1 F000 to 8.5 SP14

Description

  • Observing large memory leak in ThingWorx Platform related to Apache Tomcat WebSocket connections
  • WS connections seem to be leading to memory leaks
  • Apache Tomcat connection mechanism is holding WS connections open and cause a memory leak
  • Tomcat http-nio-<Port>-AsyncTimeout is holding on to a large number of connections
  • JVM Heap is slowly consumed until the instance runs out of heap space
    • Garbage Collection operations do not reduce the size of the heap by very much
  • When using ThingWorx Java SDK with WebSocket compression turned ON and with message size = BlockSize then connection fails:
    ClientConfigurator config = new ClientConfigurator();
    config.compressionEnabled(true);
    config.setBlockSize(8192);
  • ThingWorx Java SDK devices are stuck in perpetual connect-disconnects loop:
    (CONNECTION) Server WebSocket OPEN [session id: 33] 
    (CONNECTION) Server WebSocket CLOSED [session id: 33, reason: CloseReason: code [1009], reason [No async message support and buffer too small. Buffer size: [8,192], Message size: [1,202]]]
This is a printer-friendly version of Article 344485 and may be out of date. For the latest version click CS344485