Troubleshooting Edge SDK Applications > Multipart Messages Time Out
Multipart Messages Time Out
When a connection is lightly loaded and has little or no activity, a multipart message sent from the ThingWorx Platform to an edge client may fail to send the last chunk until it receives a message of any sort from the edge client. The end result is a message timeout on the platform. Since an edge client regularly sends pings to the server, it should be possible to avoid this timeout. However, since the default ping rate is longer than the default message timeout, multipart messages from the platform to the edge client can time out.
To resolve this issue, modify the SO_SNDBUF value that Tomcat uses for sockets. This value controls the size of the output buffer that is used by TCP. Setting it to something larger than the default message chunk size of 8192 prevented the timeouts and ensured that all the chunks were delivered as expected.
This configuration option can be set in the Connector configuration in the server.xml file for Tomcat. Here is an example. Note the socket.txBufSize option at the end of this example:

<Connector port="443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
acceptorThreadCount="2"
maxThreads="500"
scheme="https"
secure="true"
SSLEnabled="true"
keystoreFile="thingworx.keystore"
keystorePass="secret-password"
sslProtocol = "TLS"
socket.txBufSize="9216" />
Was this helpful?