Mashup Builder > Mashups > Configuring Connection Settings for Inactive Mashups
Configuring Connection Settings for Inactive Mashups
Mashups are commonly used to collect real-time data from multiple sources into a single view. To receive property updates automatically, you can configure a mashup to create WebSocket connections when using the GetProperties service. For more information, see Updating Properties Automatically in a Mashup.
Keeping unnecessary connections open when a mashup collects data from many sources and is viewed by a large number of users can affect server performance. To manage network resources and performance efficiently, ThingWorx is configured to automatically disconnect mashup WebSocket connections after 5 minutes of inactivity in version 9.3.16 and 9.4.6 or later. A mashup becomes inactive when it is not visible, such as when running in a background browser tab or window. The following widgets are examples of how a mashup can maintain connections to retrieve real-time data:
A Gauge widget showing the real-time temperature of a remote Thing.
A Grid widget that displays status messages from a remote Thing.
In both of these examples, the mashup can be configured to receive automatic updates using the GetProperties service. When the mashup is not visible, updates to the data values are still retrieved from the server until the 5–minute timeout. When the mashup returns into view, the connection is automatically re-established and the latest data values are retrieved. You can control whether connections within inactive mashups are maintained in one of the following ways, depending on your deployment type:
Using the MashupWebsocketConnectionAliveAfterTimeout setting in the platform-settings.json file for standard deployments. For more information, see platform-settings.json Configuration Details.
Using the MASHUP_WEBSOCKET_CONNECTION_ALIVE_AFTER_TIMEOUT variable for Docker images. For more information, see Azure SQL Settings, Microsoft SQL Server Settings, and PostgreSQL Settings.
Setting this configuration setting to true always maintains WebSocket connections, similar to previous versions of ThingWorx.
Was this helpful?