ThingWorx Connection Server > Fine-Tuning a Connection Server > Adjusting the transport Settings
Adjusting the transport Settings
The transport-websockets section of the configuration file contains not only the address of the ThingWorx platform but also timeout settings for authentication and other types of requests. If necessary for your environment, you can change the number of Netty IO threads, the number of Netty bytes channels, and the timeout for each channel.
In the transport.websockets section of the cxserver-long-sample.conf file, you will find the following groups and properties that you can add to the configuration file to tune your Connection Server:
1. The maximum size (in bytes) that a message can be. The default value is 1 MB (1048576 bytes). Consider changing the value of this property if the value of the metric, cxserver.alwayson.endpoint.overMaxMessageSize, increases significantly.
max-msg-size-bytes = 10448576
2. The Connection Server periodically sends unsolicited pong messages to the client to ensure that the WebSocket connection is still active. The aliveness-check group of properties defines this check:
The frequency at which the aliveness check is performed on each WebSocket connection (specified in seconds). The default value is every 60 seconds:
aliveness-check {
frequency-secs = 60
The number of seconds that the WebSocket connection must be idle before the pong message is sent (specified in seconds). The default value is 300 seconds:
aliveness-check {
frequency-secs = 60
idle-period-secs = 300
}
3. The amount of time in milliseconds before an authentication request to the ThingWorx platform times out. The default value, shown here, is 10000 milliseconds (10 seconds):
authentication.timeout.ms = 10000
4. The amount of time in milliseconds before requests to the ThingWorx platform that are not for authentication time out. The default value, shown here, is 10000 milliseconds (10 seconds):
request.default_timeout.ms = 10000
5. The number of Netty IO threads. Change this value only if you know that it is necessary for your environment. The default value, shown here, is 8:
iothread.count = 8
6. The number of Netty bytes channels to create for communications with the ThingWorx platform. Change this value only if you know that it is necessary for your environment. The default value, shown here, is 5:
connections.pipe-count = 5
7. The time in milliseconds before each channel times out while trying to connect to the ThingWorx platform:
connections.timeout.ms = 10000
8. Save the configuration file and restart the Connection Server.
Was this helpful?