11-14-2008 08:08 AM
"Local connection timed out after ~ 130000"
A tcp socket connection connected through the BES/MDS will not stay connected for long (2-5 minutes).
Just for clarification - this is not a http connection - it is a vanilla TCP socket connection for an always connected messaging application.
This happens with BES connected devices but not BIS. 4.2 and 4.5 devices have reported it. We captured the error while troubleshooting on a JDE connected device. We also have anecdotal information from users that Wi-Fi connected devices dont show this behaviour either.
We have fixed the max bytes per connection setting on the MDS ( Under Flow Control, increase the Maximum KB/Connection value to 1024) and that also verified that that limit is not being hit.
What causes this error ? How can we work around it ?
Can we pass on a different much higher timeout in the connection string like ;ConnectionTimeout=600000 or similar. Will that affect this issue ?
11-14-2008 08:18 AM
I have successfully used ConnectionTimeout to shorten the timeout from the default 2 minutes (which is the limit you seem to be hitting), so this is definitely an option for you that I would try.
Of course you could always have some sort of heartbeat transmission from the Server which the BB ignores but will keep the connection alive.
However do you really need to maintain the connection? It will be broken by loss of cover and also by phone calls anyway. A BES Push works very well if you are waiting for input from the Server, and I believe, has less impact on battery life.
11-14-2008 08:29 AM
The issue is that we are seeing connections drop when connecting through BES but not BIS.
We do have a HB in our protocol.
I suspect the error we see follows a reconnect attempt after the connection was dropped, rather than when it is dropped.
Is there a built in TCP Keep Alive parameter in Blackbery that we can control ?
(For various reasons, an always on socket connection is desired. We understand it is not optimal and a different version of the application uses push + http but requires a proxy/middleware component that customers dont like )
11-14-2008 08:31 AM
11-21-2008 04:12 PM
The ConnectionTimeout parameter can be used to shorten the timeout, but not extend it beyond 2 minutes.
How To - Control the connection timeout for TCP connections through BlackBerry Mobile Data System Connection Service
In most cases, an incoming phone call will interrupt other data connections on the BlackBerry handheld. Support for simultaneous phone and data connections can vary by carrier and location. It is possible for a carrier to support this on some towers, but not others.
11-23-2008 10:57 PM
For what this is worth -we changed the timeout to 12 hours (yes) and now see our TCP connections through the BES/MDS stay on connected for longer that without it ..
Is there any chance that in the BES/MDS mode the BES/MDS code uses this parameter for some other timeouts ? Like how long a TCP session is allowed to stay active?
Are there other settings on MDS recommended if the applicatios needs a persistent TCP connection ? For example, we have already increased the max KB/flow parameter. What does the Allow Persistent Connection parameter do ? It appears that persistent connections seem to be allowed with or with out it.
12-02-2008 10:39 AM