Installation and Configuration > Installing ThingWorx > Installation Appendices > platform-settings.json Configuration Details
platform-settings.json Configuration Details
The platform-settings.json file is available for administrators to adjust settings for fine-tuning and is available in the software download.
* 
The sample below contains all options. Only one persistence provider is required.
{
"PlatformSettingsConfig": {
"BasicSettings": {
"BackupStorage": "/ThingworxBackupStorage",
"DatabaseLogRetentionPolicy": 7,
"EnableBackup": true,
"EnableHA": false,
"EnableSystemLogging": false,
"EnableSSO": false,
"FileRepositoryRoot": "/ThingworxStorage",
"HTTPRequestHeaderMaxLength": 2000,
"HTTPRequestParameterMaxLength": 2000,
"InternalAesCryptographicKeyLength": 128,
"Storage": "/ThingworxStorage",
"ScriptTimeout": 30
},
"SolutionCentralSettings": {
"SolutionCentralHost": "<Solution Central host name>",
"KeyStorePath": "<Path for your keystore>",
"KeyStorePass": "<Password for your keystore>"
},
"AdministratorUserSettings": {
"InitialPassword": "changeme"
},
"ContentTypeSettings": {
"supportedMediaEntityContentTypes" : ["image/svg+xml","image/png","image/gif","image/bmp","image/jpeg","application/pdf","image/vnd.microsoft.icon"]
},
"OrchestrationSettings": {
"EnableOrchestration": true,
"QueueHost": "localhost",
"QueuePort": 5672,
"QueueName": "256mb",
"QueueUsername": "flowuser",
"QueuePassword": "encrypt.queue.password",
"QueueVHost": "orchestration"
},
"ExtensionPackageImportPolicy": {
"importEnabled": false,
"allowJarResources": false,
"allowJavascriptResources": false,
"allowCSSResources": false,
"allowJSONResources": false,
"allowWebAppResources": false,
"allowEntities": false,
"allowExtensibleEntities": false
},
"HASettings": {
"CoordinatorConnectionTimeout": 15000,
"CoordinatorHosts": "127.0.0.1:2181",
"CoordinatorMaxRetries": 3,
"CoordinatorRetryTimeout": 1000,
"CoordinatorSessionTimeout": 90000,
"CoordinatorZNode": "/HALeadershipCoordinator",
"LoadBalancerBase64EncodedCredentials": "QWRtaW5pc3RyYXRvcjphZG1pbg=="
},
"LicensingConnectionSettings": {
"username": "<username>",
"password": "<password>",
"timeout":"60",
"useProxy": false,
"proxyHost": "<proxyHost>",
"proxyPort" : "<proxy port>",
"proxyScheme": "<http or https>",
"proxyUseNTLM": true,
"proxyUsername": "<user>",
"proxyPassword": "<user password>",
"proxyWorkstation": "<dummyWorkstation>",
"proxyDomain": "<dummyDomain>"
}
},
"PersistenceProviderPackageConfigs": {
"NeoPersistenceProviderPackage": {
"StreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumQueueSize": 250000,
"maximumWaitTime": 10000,
"scanRate": 5,
"sizeThreshold": 1000
},
"ValueStreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumQueueSize": 500000,
"maximumWaitTime": 10000,
"scanRate": 5,
"sizeThreshold": 1000
},
"PersistentPropertyProcessorSettings": {
"maximumBlockSize": 2500,
"maximumWaitTime": 1000,
"maximumQueueSize": 100000,
"numberOfProcessingThreads": 20,
"scanRate": 25,
"sizeThreshold": 1000
}
},
"H2PersistenceProviderPackage": {
"ConnectionInformation": {
"acquireIncrement": 5,
"acquireRetryAttempts": 30,
"acquireRetryDelay": 1000,
"checkoutTimeout": 2000,
"idleConnectionTestPeriod": 6,
"initialPoolSize": 10,
"maxConnectionAge": 0,
"maxIdleTime": 0,
"maxIdleTimeExcessConnections": 36000,
"maxPoolSize": 100,
"maxStatements": 0,
"maxStatementsPerConnection": 50,
"minPoolSize": 10,
"numHelperThreads": 6,
"password": "password",
"tableLockTimeout": 10000,
"testConnectionOnCheckout": false,
"unreturnedConnectionTimeout": 0,
"username": "twadmin"
},
"StreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumQueueSize": 250000,
"maximumWaitTime": 10000,
"numberOfProcessingThreads": 5,
"scanRate": 5,
"sizeThreshold": 1000
},
"ValueStreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumWaitTime": 10000,
"maximumQueueSize": 500000,
"numberOfProcessingThreads": 5,
"scanRate": 5,
"sizeThreshold": 1000
},
"PersistentPropertyProcessorSettings": {
"maximumBlockSize": 2500,
"maximumWaitTime": 1000,
"maximumQueueSize": 100000,
"numberOfProcessingThreads": 20,
"scanRate": 25,
"sizeThreshold": 1000
}
},
"PostgresPersistenceProviderPackage": {
"ConnectionInformation": {
"acquireIncrement": 5,
"acquireRetryAttempts": 3,
"acquireRetryDelay": 10000,
"checkoutTimeout": 1000000,
"driverClass": "org.postgresql.Driver",
"fetchSize": 5000,
"idleConnectionTestPeriod": 60,
"initialPoolSize": 5,
"jdbcUrl": "jdbc:postgresql://localhost:5432/thingworx",
"maxConnectionAge": 0,
"maxIdleTime": 0,
"maxIdleTimeExcessConnections": 300,
"maxPoolSize": 100,
"maxStatements": 100,
"minPoolSize": 5,
"numHelperThreads": 8,
"password": "password",
"testConnectionOnCheckout": false,
"unreturnedConnectionTimeout": 0,
"username": "twadmin"
},
"StreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumQueueSize": 250000,
"maximumWaitTime": 10000,
"numberOfProcessingThreads": 5,
"scanRate": 5,
"sizeThreshold": 1000
},
"ValueStreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumQueueSize": 500000,
"maximumWaitTime": 10000,
"numberOfProcessingThreads": 5,
"scanRate": 5,
"sizeThreshold": 1000
},
"PersistentPropertyProcessorSettings": {
"maximumBlockSize": 2500,
"maximumWaitTime": 1000,
"maximumQueueSize": 100000,
"numberOfProcessingThreads": 20,
"scanRate": 25,
"sizeThreshold": 1000
}
},
"MssqlPersistenceProviderPackage": {
"ConnectionInformation": {
"acquireIncrement": 5,
"acquireRetryAttempts": 3,
"acquireRetryDelay": 10000,
"checkoutTimeout": 1000000,
"driverClass": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"fetchSize": 5000,
"idleConnectionTestPeriod": 60,
"initialPoolSize": 5,
"jdbcUrl": "jdbc:sqlserver://localhost:1433;databaseName=thingworx;applicationName=Thingworx;",
"maxConnectionAge": 0,
"maxIdleTime": 0,
"maxIdleTimeExcessConnections": 300,
"maxPoolSize": 100,
"maxStatements": 100,
"minPoolSize": 5,
"numHelperThreads": 8,
"password": "Password@123",
"testConnectionOnCheckout": false,
"unreturnedConnectionTimeout": 0,
"username": "msadmin"
},
"StreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumQueueSize": 250000,
"maximumWaitTime": 10000,
"numberOfProcessingThreads": 5,
"scanRate": 5,
"sizeThreshold": 1000
},
"ValueStreamProcessorSettings": {
"maximumBlockSize": 2500,
"maximumWaitTime": 10000,
"maximumQueueSize": 500000,
"numberOfProcessingThreads": 5,
"scanRate": 5,
"sizeThreshold": 1000
},
"PersistentPropertyProcessorSettings": {
"maximumBlockSize": 2500,
"maximumWaitTime": 1000,
"maximumQueueSize": 100000,
"numberOfProcessingThreads": 20,
"scanRate": 25,
"sizeThreshold": 1000
}
}
}
}
platform-settings.json Options
For all databases listed below, the following guidelines should be followed for value stream processor settings and stream processor settings :
StreamProcessorSettings.numberOfProcessingThreads + ValueStreamProcessorSettings.numberOfProcessingThreads < 50% of DB connection pool
And
ValueStreamProcessorSettings.numberOfProcessingThreads >= StreamProcessorSettings.numberOfProcessingThreads
Basic Settings
Setting
Default
Description
BackupStorage
/ThingworxBackupStorage
The directory name where all backups are written to.
DatabaseLogRetentionPolicy
7
The number of days that database logs are retained.
EnableBackup
true
Determines whether backups are retained.
EnableHA
false
Determines whether ThingWorx can be configured for a highly available landscape.
EnableSystemLogging
false
Determines whether system logging is enabled.
* 
Do not turn this on unless instructed by ThingWorx Support.
EnableSSO
false
Set to true to enable SSO for ThingWorx Platform. When SSO is enabled, all authentication is redirected to the central authorization server that is configured in the sso-settings.json file. Edge websocket authentication is not affected.
FileRepositoryRoot
/ThingworxStorage
The directory where the root file repository is created. The default location is sufficient for standalone deployments. For ThingWorx HA deployments, the repository should be located on a shared file system where all ThingWorx servers have access.
HTTPRequestHeaderMaxLength
2000
The maximum allowable length for HTTP Request Headers values.
HTTPRequestParameterMaxLength
2000
The maximum allowable length for HTTP Request Parameter values.
InternalAesCryptographicKeyLength
128
Key length used when generating a symmetric AES key. Supported values are 128, 192, and 256.
* 
Encryption and decryption will fail if the key length is higher than 128 and the Java policies are not configured to use that key size.
Storage
/ThingworxStorage
The directory where all storage directories are created/located (excluding Backup Storage).
ScriptTimeout
30
The maximum number of seconds that a script may execute before the ThingWorx platform terminates the script.
* 
Scripts on the platform are terminated automatically if the script executes for longer than the number of seconds configured for this timeout.
* 
Please consider the sensitivity and/or importance of the information handled by scripts when configuring their timeout duration. Although it is important to terminate scripts after a given period of time for security reasons, doing so prematurely can lead to a loss of data. Due to the flexibility of the ThingWorx platform, there are use cases that could potentially require timeout periods shorter or longer than the default.
Solution Central Settings
Setting
Default
Description
SolutionCentralHost
sc.thingworx.com
Solution Central host name.
SolutionCentralPort
443
Solution Central port details.
* 
Do not set SolutionCentralPort if it has a default value.
KeyStorePath
/ThingworxPlatform/sc-keystore
Path for your keystore.
KeyStorePass
None
Password for your keystore.
* 
For encrypting your password, set KeyStorePass to encrypt.sc.password.
ThingWorx Flow Settings
These properties are applicable only if ThingWorx Flow is installed on ThingWorx Foundation. These values must be defined, both in ThingWorx Flow and RabbitMQ configuration files and must not be edited unless changed across both applications.
Setting
Default
Description
EnableOrchestration
true
Indicates if ThingWorx Flow is enabled in ThingWorx Foundation.
QueueHost
localhost
RabbitMQ host name
QueuePort
5672
RabbitMQ port
QueueName
256mb
RabbitMQ queue name
QueueUsername
flowuser
RabbitMQ queue username
QueuePassword
encrypt.queue.password
RabbitMQ queue password
* 
The password is automatically encrypted while installing ThingWorx Flow on the same machine as ThingWorx Foundation.
If ThingWorx Flow is installed on a different machine than ThingWorx Foundation, you need to encrypt this password.
QueueVHost
orchestration
RabbitMQ VHost name
Extension Package Import Policy
Extension import is disabled by default for all users. Use the following settings to configure extension import functionality. Reference Importing Extensions for more information.
Setting
Description
Default
Examples
importEnabled
The top level control that represents the ability to import (=true) or not import (=false) extensions.
false
"importEnabled": false - Extensions cannot be imported, even if other ExtensionPackageImportPolicy settings are set to true.
"importEnabled": true - Passes the extension import to the next set of allow<Content>Resources settings (see rows below).
* 
If the allow<Content>Resources settings are false, then an empty extension (no entities, extensible entities, or resources) can be imported. Since this is likely not a useful configuration, if importEnabled is set to true, at least one other allow<Content>Resources setting should also be set to true.
allowJarResources
Allows extensions with Jar Resources to be imported.
false
"allowJarResources": true - allows extensions that declare jar files in their manifest as jar resources to be imported.
"allowJarResources": false -will not allow extensions that declare jar files in their manifest as jar resources to be imported.
allowJavascriptResources
Allows extensions with JavaScript Resources to be imported.
false
"allowJavascriptResources": true -allows extensions that declare JavaScript UI file resources of JS type in their manifest as JavaScript resources to be imported.
"allowJavascriptResources": false - will not allow extensions that declare JavaScript UI file resources of JS type in their manifest as JavaScript resources to be imported.
allowCSSResources
Allows extensions with CSS Resources to be imported.
false
"allowCSSResources": true -allows extensions that contain CSS UI file resources to be imported.
"allowCSSResources": false -will not allow extensions that contain CSS UI file resources to be imported.
allowJSONResources
Allows extensions with JSON Resources (for example, localization files) to be imported.
false
"allowJSONResources": true - allows extensions that contain JSON UI file resources to be imported.
"allowJSONResources": false - will not allow extensions that contain JSON UI file resources to be imported.
allowWebAppResources
Allows extensions with Web Resources to be imported.
false
"allowWebAppResources": true - allows extensions that contain WebApp UI file resources to be imported.
"allowWebAppResources": false - will not allow extensions that contain WebApp UI file resources to be imported.
allowEntities
Allows extensions with non-extensible entities to be imported. Examples of non-extensible entities include:
Application Key
Authenticator
Dashboard
Data Analysis Definition
Data Shape
GenericContentEntity and derived child classes like State Definition, Style Definition, Style Theme
Group
Localization Table
Log
Mashup
Media Entity
Menu
ModeledServiceProviderEntity and child classes like Notification Content
Network
Notification Definition
Organization
Persistence Provider
PersistenceProviderPackage and derived child classes
Project
Thing Shape
Thing Template
User
Vocabulary and derived child classes like DataTagVocabulary, ModelTagVocabulary
false
"allowEntities": true - allows extensions that declare non-extensible entities in their manifest to be imported.
"allowEntities": false - will not allow extensions that declare non-extensible entities in their manifest to be imported.
allowExtensibleEntities
Allows extensions with non-extensible entities to be imported. Examples of extensible entities include:
DirectoryService and derived child classes
ExtensionPackage
Resource and derived child classes that contain custom functions/services used as resources similar to OOTB Resources such as InfoTableFunctions, EntityServices, and EncryptionServices.
* 
The OOTB Subsystems that are not part of extensions are not affected.
ScriptFunctionLibrary and derived child classes.
Subsystem and derived child classes.
* 
The OOTB Subsystems that are not part of extensions are not affected.
Thing Package
Widget
false
"allowExtensibleEntities": true - allows extensions that declare extensible entities in their manifest to be imported.
"allowExtensibleEntities": false - will not allow extensions that declare extensible entities in their manifest to be imported.
HA Settings
Settings specific to a PostgreSQL HA landscape configuration. All settings are ignored if the EnableHA setting above is set to false. CoordinatorHosts and LoadBalancerBase64EncodedCredentials must be modified to suit your environment.
Setting
Default
Description
CoordinatorConnectionTimeout
15000
How long to wait (in milliseconds) for a connection to be established with Apache ZooKeeper service used to coordinate ThingWorx leadership.
CoordinatorHosts
127.0.0.1:2181
A comma-delimited list of the Apache ZooKeeper servers used to coordinate ThingWorx leader election. String pattern is IP:port. (e.g. "127.0.0.1:2181, 127.0.0.2:2181").
CoordinatorMaxRetries
3
The maximum allowable number of retries that will be made to establish a connection with the Apache ZooKeeper service used to coordinate ThingWorx leadership.
CoordinatorRetryTimeout
1000
How long to wait (in milliseconds) for each retry attempt.
CoordinatorSessionTimeout
90000
How long ThingWorx waits (in milliseconds) without receiving a "heartbeat" from the Apache ZooKeeper service used to coordinate ThingWorx leadership.
CoordinatorZNode
/HALeadershipCoordinator
When one Apache ZooKeeper service is shared by multiple ThingWorx HA deployments, this setting must provide a unique value for each ThingWorx HA deployment. This setting’s value can be arbitrary but must follow the format /<anyTextHere>. For example, ThingWorx instances TWX1 and TWX2 are in HA system A, and ThingWorx instances TWX3 and TWX4 are in HA system B. CoordinatorZNode is set to /HAsystemA for TWX1 and TWX2, and it is set to /HAsystemB for TWX3 and TWX4.
LoadBalancerBase64EncodedCredentials
QWRtaW5pc3RyYXRvcjphZG1pbg==
The Base64-encoded credentials for the HA Load Balancer, in the format of <user>:<unique password>
* 
Do not use a ThingWorx user.
* 
You can use any utility that Base64 encodes the matching <user>:<unique password> string used in your load balancer setup.
Administrator User Settings
Setting
Default
Description
InitialPassword
n/a
The initial Administrator password that is required to log into ThingWorx for the first time. The minimum length can be configured in the User Management Subsystem (minimum 10 characters, default is 14 characters). See Passwords for more information.
Content Type Settings
Setting
Default
Description
supportedMediaEntityContentTypes
"image/svg+xml","image/png","image/gif","image/bmp","image/jpeg","application/pdf","image/vnd.microsoft.icon"
Comma-delimited list of valid MIME content types that can be dynamically linked to Media entities. Additional types can be added.
* 
If the content type that is coming from a different server not a supported media entity type, then the content is downloaded as a file on the client machine instead of streamed with the media entity.
Licensing Connection Settings
Setting
Default
Description
username
n/a
PTC Support site username
password
n/a
PTC Support site password
timeout (in seconds)
60
After the timeout period, the following error is logged in the Application Log:
License Server could not process request
useProxy
false
Enables proxy settings for licensing. If true, proxy settings are used to connect to the licensing server.
proxyHost
The name of the proxy host.
proxyPort
The port number of the proxy host.
proxyScheme
http
http or https.
proxyUsername
The username for authentication if the proxy server connection requires authentication.
proxyPassword
The password for authentication if the proxy server connection requires authentication.
* 
See Encrypting Passwords for information on encrypting this value.
proxyUseNTLM
false
Option to use the NTLM protocol.
proxyWorkstation
The name of the user's computer on the network, if NTLM authentication is required.
proxyDomain
The name of the user's domain, if NTLM authentication is required.
NeoPersistenceProviderPackage
Contains Neo4j-specific Persistence Provider settings. If Neo4j is not the Persistence Provider, this entire section should be ignored.
Setting
Default
Description
StreamProcessorSettings
maximumBlockSize
2500
The maximum number of stream writes to process in one block.
maximumQueueSize
250000
The maximum number of stream entries to queue (will be rejected after that).
maximumWaitTime
10000
The maximum wait time (in milliseconds) before flushing stream buffer.
scanRate
5
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing stream buffer.
ValueStreamProcessorSettings
maximumBlockSize
2500
The maximum number of stream writes to process in one block.
maximumQueueSize
500000
The maximum number of stream entries to queue (will be rejected after that).
maximumWaitTime
10000
The maximum wait time (in milliseconds) before flushing the stream buffer.
scanRate
5
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing stream buffer.
PersistentPropertyProcessorSettings
maximumBlockSize
2500
The maximum number of property writes to process in one block.
maximumWaitTime
1000
The maximum wait time (in milliseconds) before flushing the property buffer.
maximumQueueSize
100000
The maximum number of property entries to queue (will be rejected after that).
numberOfProcessingThreads
20
The number of threads to use when processing properties.
scanRate
25
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing the property buffer.
H2PersistenceProviderPackage
Setting
Default
Description
Connection Information
acquireIncrement
5
Determines how many connections at a time the ThingWorx will try to acquire when the pool is exhausted.
acquireRetryAttempts
30
Defines how many times ThingWorx will try to acquire a new connection from the database before giving up.
acquireRetryDelay
1000
The time (in milliseconds) ThingWorx will wait between acquire attempts.
checkoutTimeout
1000000
The number of milliseconds a client calling getConnection() will wait for a connection to be checked-in or acquired when the pool is exhausted.
idleConnectionTestPeriod
6
Time period (in seconds) where connections will be tested so that idle connections won’t be closed from outside processes such as firewalls, etc. If this is a number greater than 0, ThingWorx will test all idle, pooled but unchecked-out connections, every x number of seconds.
* 
If you are experiencing “No connection to model provider” errors, review this setting. Compare to firewall defaults. Lowering the default will alleviate disconnection issues.
initialPoolSize
10
Initial number of database connections created and maintained within a pool upon startup. Should be between minPoolSize and maxPoolSize.
maxConnectionAge
0
Seconds, effectively a time to live. A connection older than maxConnectionAge will be destroyed and purged from the pool.
maxIdleTime
0
Seconds a connection can remain pooled but unused before being discarded. Zero means idle connections never expire.
maxIdleTimeExcessConnections
36000
The number of seconds that connections in excess of minPoolSize are permitted to remain in idle in the pool before being culled. Intended for applications that wish to aggressively minimize the number of open connections, shrinking the pool back towards minPoolSize if, following a spike, the load level diminishes and connections acquired are no longer needed. If maxIdleTime is set, maxIdleTimeExcessConnections should be smaller to have any effect. Setting this to zero means no enforcement and excess connections are not idled out.
maxPoolSize
100
Maximum number of connections a pool will maintain at any given time.
maxStatements
0
The size of the ThingWorx global PreparedStatement cache.
maxStatementsPerConnection
50
The size of the ThingWorx global PreparedStatement cache for each connection.
minPoolSize
5
Minimum number of connections a pool will maintain at any given time.
numHelperThreads
6
The number of helper threads to spawn. Slow JDBC operations are generally performed by helper threads that don't hold contended locks. Spreading these operations over multiple threads can significantly improve performance by allowing multiple operations to be performed simultaneously.
password
n/a
Database password.
username
twadmin
Database username.
tableLockTimeout
10000
The number of milliseconds a client will wait for a database table to be unlocked.
testConnectionOnCheckout
false
If true, an operation will be performed at every connection checkout to verify that the connection is valid.
unreturnedConnectionTimeout
0
The number of seconds to wait for a response from an unresponsive connection before discarding it. If set, if an application checks out but then fails to check-in a connection within the specified period of time, the pool will discard the connection. This permits applications with occasional connection leaks to survive, rather than eventually exhausting the connection pool. Zero means no timeout, and applications are expected to close their own connections.
StreamProcessorSettings
maximumBlockSize
2500
The maximum number of stream writes to process in one block.
maximumQueueSize
250000
The maximum number of stream entries to queue (will be rejected after that).
maximumWaitTime
10000
The maximum wait time (in milliseconds) before flushing stream buffer.
numberOfProcessingThreads
5
The number of threads to use when processing properties.
scanRate
5
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing stream buffer.
ValueStreamProcessorSettings
maximumBlockSize
2500
The maximum number of stream writes to process in one block.
maximumQueueSize
250000
The maximum number of stream entries to queue (will be rejected after that).
maximumWaitTime
10000
The maximum wait time (in milliseconds) before flushing the stream buffer.
numberOfProcessingThreads
5
The number of threads to use when processing properties.
scanRate
5
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing stream buffer.
PersistentPropertyProcessorSettings
maximumBlockSize
2500
The maximum number of property writes to process in one block.
maximumWaitTime
1000
The maximum wait time (in milliseconds) before flushing the property buffer.
maximumQueueSize
100000
The maximum number of property entries to queue (will be rejected after that).
numberOfProcessingThreads
20
The number of threads to use when processing properties.
scanRate
25
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing the property buffer.
PostgresPersistenceProviderPackage
Setting
Default
Description
ConnectionInformation
acquireIncrement
5
Determines how many connections at a time the platform will try to acquire when the pool is exhausted.
acquireRetryAttempts
3
Defines how many times ThingWorx will try to acquire a new connection from the database before giving up.
acquireRetryDelay
10000
The time (in milliseconds) ThingWorx will wait between acquire attempts.
checkoutTimeout
10000000
The number of milliseconds a client calling getConnection()will wait for a connection to be checked-in or acquired when the pool is exhausted.
driverClass
org.postgresql.Driver
The fully-qualified class name of the JDBC driverClass that is expected to provide Connections.
fetchSize
5000
The count of rows to be fetched in batches instead of caching all rows on the client side.
idleConnectionTestPeriod
60
If this is a number greater than 0, ThingWorx will test all idle, pooled but unchecked-out connections, every x number of seconds.
initialPoolSize
5
Initial number of database connections created and maintained within a pool upon startup. Should be between minPoolSize and maxPoolSize.
jdbcUrl
jdbc:postgresql://localhost:5432/thingworx
The jdbc url used to connect to PostgreSQL.
* 
If the default schema name is changed (from public), you must add <databasename>?currentSchema=<name of schema>. For example, if the schema name is mySchema, it would be: jdbc:postgresql://<DBServer>:<DBPort>/<databasename>?currentSchema=mySchema
* 
If you are configuring an HA solution, this should reflect the server IP that the pgPool process is running on. Change the port to the port that pgPool is serving.
maxConnectionAge
0
Seconds, effectively a time to live. A Connection older than maxConnectionAge will be destroyed and purged from the pool.
maxIdleTime
0
Seconds a connection can remain pooled but unused before being discarded. Zero means idle connections never expire.
maxIdleTimeExcessConnections
300
The number of seconds that connections in excess of minPoolSize are permitted to remain in idle in the pool before being culled. Intended for applications that wish to aggressively minimize the number of open connections, shrinking the pool back towards minPoolSize if, following a spike, the load level diminishes and connections acquired are no longer needed. If maxIdleTime is set, maxIdleTimeExcessConnections should be smaller to have any effect. Setting this to zero means no enforcement and excess connections are not idled out.
maxPoolSize
100
Maximum number of connections a pool will maintain at any given time.
maxStatements
100
The size of ThingWorx’s global PreparedStatement cache.
minPoolSize
5
Minimum number of Connections a pool will maintain at any given time.
numHelperThreads
8
The number of helper threads to spawn. Slow JDBC operations are generally performed by helper threads that don't hold contended locks. Spreading these operations over multiple threads can significantly improve performance by allowing multiple operations to be performed simultaneously.
password
<unique password>
The password used to log into the database.
testConnectionOnCheckout
false
If true, an operation will be performed at every connection checkout to verify that the connection is valid.
unreturnedConnectionTimeout
0
The number of seconds to wait for a response from an unresponsive connection before discarding it. If set, if an application checks out but then fails to check-in a connection within the specified period of time, the pool will discard the connection. This permits applications with occasional connection leaks to survive, rather than eventually exhausting the Connection pool. Zero means no timeout, and applications are expected to close their own connections.
username
twadmin
The user that has the privilege to modify tables. This is the user created on the database for the ThingWorx server.
* 
To change the PostgreSQL password: Change this user's password, and also change the unencrypted password setting in the platform-settings.json file or the encrypted value in the /ThingworxStorage/keystore.jks keystore.
Stream Processor Settings
maximumBlockSize
2500
The maximum number of stream writes to process in one block.
maximumQueueSize
250000
The maximum number of stream entries to queue (will be rejected after that).
maximumWaitTime
10000
Number of milliseconds the system waits before flushing the stream buffer.
numberOfProcessingThreads
5
The number of processing threads.
scanRate
5
The buffer status is checked at the specified rate value in milliseconds.
sizeThreshold
1000
Maximum number of items to accumulate before flushing the stream buffer.
Value Stream Processor Settings
maximumBlockSize
2500
Maximum number of value stream writes to process in one block.
maximumQueueSize
500000
Maximum number of value stream entries to queue (will be rejected after that).
maximumWaitTime
10000
Number of milliseconds the system waits before flushing the value stream buffer.
numberofProcessingThreads
5
The number of processing threads.
scanRate
5
The rate (in milliseconds) before flushing the stream buffer.
sizeThreshold
1000
Maximum number of items to accumulate before flushing the value stream buffer.
PersistentPropertyProcessorSettings
maximumBlockSize
2500
The maximum number of property writes to process in one block.
maximumWaitTime
1000
The maximum wait time (in milliseconds) before flushing the property buffer.
maximumQueueSize
100000
The maximum number of property entries to queue (will be rejected after that).
numberOfProcessingThreads
20
The number of threads to use when processing properties.
scanRate
25
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing the property buffer.
MssqlPersistenceProviderPackage
Setting
Default
Description
ConnectionInformation
acquireIncrement
5
Determines how many connections at a time ThingWorx will try to acquire when the pool is exhausted.
acquireRetryAttempts
3
Defines how many times ThingWorx will try to acquire a new connection from the database before giving up.
acquireRetryDelay
10000
The time (in milliseconds) ThingWorx will wait between acquire attempts.
checkoutTimeout
1000000
The number of milliseconds a client calling getConnection() will wait for a connection to be checked-in or acquired when the pool is exhausted.
driverClass
com.microsoft.sqlserver.jdbc.SQLServerDriver
The fully-qualified class name of the JDBC driverClass that is expected to provide connections.
fetchSize
5000
The count of rows to be fetched in batches instead of caching all rows on the client side.
idleConnectionTestPeriod
60
Time period (in seconds) where connections will be tested so that idle connections won’t be closed from outside processes such as firewalls, etc. If this is a number greater than 0, ThingWorx will test all idle, pooled but unchecked-out connections, every x number of seconds.
* 
If you are experiencing “No connection to model provider” errors, review this setting. Compare to firewall defaults. Lowering the default will alleviate disconnection issues.
initialPoolSize
5
Initial number of database connections created and maintained within a pool upon startup. Should be between minPoolSize and maxPoolSize.
jdbcUrl
jdbc:sqlserver://localhost:1433;databaseName=thingworx;applicationName=Thingworx;
The jdbc url used to connect to MSSQL.
maxConnectionAge
0
Seconds, effectively a time to live. A connection older than maxConnectionAge will be destroyed and purged from the pool.
maxIdleTime
0
Seconds a connection can remain pooled but unused before being discarded. Zero means idle connections never expire.
maxIdleTimeExcessConnections
300
The number of seconds that connections in excess of minPoolSize are permitted to remain in idle in the pool before being culled. Intended for applications that wish to aggressively minimize the number of open connections, shrinking the pool back towards minPoolSize if, following a spike, the load level diminishes and Connections acquired are no longer needed. If maxIdleTime is set, maxIdleTimeExcessConnections should be smaller to have any effect. Setting this to zero means no enforcement and excess connections are not idled out.
maxPoolSize
100
Maximum number of Connections a pool will maintain at any given time.
maxStatements
100
The size of the ThingWorx global PreparedStatement cache.
minPoolSize
5
Minimum number of Connections a pool will maintain at any given time.
numHelperThreads
8
The number of helper threads to spawn. Slow JDBC operations are generally performed by helper threads that don't hold contended locks. Spreading these operations over multiple threads can significantly improve performance by allowing multiple operations to be performed simultaneously.
password
<unique password>
The password to log into the database.
testConnectionOnCheckout
false
If true, an operation will be performed at every connection checkout to verify that the connection is valid.
unreturnedConnectionTimeout
0
The number of seconds to wait for a response from an unresponsive connection before discarding it. If set, if an application checks out but then fails to check-in a connection within the specified period of time, the pool will discard the connection. This permits applications with occasional connection leaks to survive, rather than eventually exhausting the Connection pool. Zero means no timeout, and applications are expected to close their own connections.
username
msadmin
This is the userid that owns the TWSCHEMA schema and is used for authentication to MSSQL in the JDBC connection string.
Stream Processor Settings
maximumBlockSize
2500
The maximum number of stream writes to process in one block.
maximumQueueSize
250000
The maximum number of stream entries to queue (will be rejected after that).
maximumWaitTime
10000
Number of milliseconds the system waits before flushing the stream buffer.
numberOfProcessingThreads
5
The number of processing threads.
scanRate
5
The buffer status is checked at the specified rate value in milliseconds.
sizeThreshold
1000
Maximum number of items to accumulate before flushing the stream buffer.
Value Stream Processor Settings
maximumBlockSize
2500
Maximum number of value stream writes to process in one block.
maximumWaitTime
10000
Number of milliseconds the system waits before flushing the value stream buffer.
maximumQueueSize
500000
Maximum number of value stream entries to queue (will be rejected after that).
numberofProcessingThreads
5
The number of processing threads.
scanRate
5
The rate (in milliseconds) before flushing the stream buffer.
sizeThreshold
1000
Maximum number of items to accumulate before flushing the value stream buffer.
PersistentPropertyProcessorSettings
maximumBlockSize
2500
The maximum number of property writes to process in one block.
maximumWaitTime
1000
The maximum wait time (in milliseconds) before flushing the property buffer.
maximumQueueSize
100000
The maximum number of property entries to queue (will be rejected after that).
numberOfProcessingThreads
20
The number of threads to use when processing properties.
scanRate
25
The rate (in milliseconds) at which to check the buffer status.
sizeThreshold
1000
The maximum number of items to accumulate before flushing the property buffer.
Was this helpful?