I noticed that my UI would timeout and require re-connection after a period of inactivity. (I like to leave my UI open all the time)
To resolve the issue I added the following line to the uc4config.xml:
<active>2</active_keepalive>
Definition:
<active>time frame</active_keepalive>
Time in minutes in which the UserInterface sends messages to the Automation Engine in order to keep the connection.
This parameter does not depend on <tcpip>. The setting <tpcip> activates and keeps the connection on socket level which means that the time interval of keep-alive packages cannot be influenced. <active> addresses the program level.
</code></pre>
So now the uc4config.xml looks like:
<paths>
<docu type="hh">../../docu</docu>
<logging count="10">../temp/UCDJ_LOG_##.TXT</logging>
<trace count="10" ra="0" tcp="0" xml="0">../temp/UCDJ_TRC_##.TXT</trace>
<tcpip>1</tcpip_keepalive>
<active>2</active_keepalive>
<tcp>1</tcp_nodelay>
<sendbuffersize>1048576</sendbuffersize>
<recvbuffersize>1048576</recvbuffersize>
</tcp></active></tcpip></paths>
</active></tpcip></tcpip></active></active>