How to improve connection stability?

Options
Sergiy
Sergiy
edited March 2013 in Photon Server
Hi

Quite often I see 'CTCPPolicySocketServer: connection timeout' in photon server logs. I have AS3 clients. Also, in my monitoring .NET application there are QueueIncomingReliableWarnings.

Here is a part of log file:
[code2=plain]7552: 13:46:44.888 - Adding TCP listener on :0.0.0.0: 21311 with a listen backlog of: 150
7552: 13:46:44.888 - TCP inactivity timeout: 5000ms
7552: 13:46:44.888 - TCP disconnect timeout: 120000ms
7552: 13:46:44.888 - MaxInboundMessageSize: 512000
7552: 13:46:44.888 - MaxOutboundMessageSize: 512000
7552: 13:46:44.888 - Routing policy file requests to: "Policy"
7552: 13:46:44.888 - Adding TCP listener on :0.0.0.0: 21312 with a listen backlog of: 150
7552: 13:46:44.888 - TCP inactivity timeout: 5000ms
7552: 13:46:44.888 - TCP disconnect timeout: 120000ms
7552: 13:46:44.888 - MaxInboundMessageSize: 512000
7552: 13:46:44.888 - MaxOutboundMessageSize: 512000
7552: 13:46:44.888 - Routing policy file requests to: "Policy"
7552: 13:46:44.889 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
7552: 13:46:44.889 - TCP inactivity timeout: 1000ms
7552: 13:46:44.889 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
7552: 13:46:44.889 - TCP inactivity timeout: 1000ms
7552: 13:46:44.923 - Service is running...
11172: 14:19:38.891 - CTCPPolicySocketServer: connection timeout
11172: 14:55:03.568 - CTCPPolicySocketServer: connection timeout
11172: 15:16:13.833 - CTCPPolicySocketServer: connection timeout
11172: 15:19:13.467 - CTCPPolicySocketServer: connection timeout
11172: 16:38:58.173 - CTCPPolicySocketServer: connection timeout
11172: 16:40:07.157 - CTCPPolicySocketServer: connection timeout
11172: 16:51:10.707 - CTCPPolicySocketServer: connection timeout
11172: 16:53:04.277 - CTCPPolicySocketServer: connection timeout
11172: 17:12:03.848 - CTCPPolicySocketServer: connection timeout
11172: 17:13:59.226 - CTCPPolicySocketServer: connection timeout
11172: 17:14:46.697 - CTCPPolicySocketServer: connection timeout
11172: 17:26:16.846 - CTCPPolicySocketServer: connection timeout
11172: 18:04:12.075 - CTCPPolicySocketServer: connection timeout
11172: 18:53:46.468 - CTCPPolicySocketServer: connection timeout
11172: 19:00:04.176 - CTCPPolicySocketServer: connection timeout
11172: 19:49:43.911 - CTCPPolicySocketServer: connection timeout
11172: 20:02:12.913 - CTCPPolicySocketServer: connection timeout[/code2]

MaxInboudMessageSize is 512 KB. not a single message comes close to 5KB.

Perhaps increasing TCP Inactivity Timeout will allow clients to re-establish connection automatically?

What can be done to prevent client disconnects during small network drops?

Comments

  • Increasing the TCP inactivity timeout on the TCP policy listener might help and reduce the occurrence of the timeouts. Up to 5000ms might be okay for policy requests.

    I'm sorry that there is (currently) not much else you can do about this. We've noticed ourselves that connection timeouts on the policy listener happen more often than we would expect, so we plan to spend some time on investigation and see if we can find a way to improve the behavior.
  • Sergiy
    Options
    Hi Nicole

    I've increased InactivityTimeout to 5000ms for PolicyListener and to 10000ms to TCPListener. When you'll start investigation please also consider that AS3 TCP clients also are disconnecting from time to time without any obvious reason. Can you give me some advice about it please?