UCP Connection dropped

UCP Connection dropped SearchSearch
Author Message
Giuseppe Plagenza
New member
Username: Gplagenza

Post Number: 3
Registered: 06-2010
Posted on Monday, December 06, 2010 - 12:23 pm:   

Hi, we have connected NowSms to A SMSC over a UCP connection and expect to receive incoming messages on a daily basis.
After the first successful 4 days, we found out that no more messages had been received and no error message had been traced.
After a service restart, all missed messages were succesfully delivered to the gateway.
Based on this behaviour, I have a couple of questions:
1- can the keep-alive setting be useful to fix this situation and, eventually, which value do you recommend ?
Are there any other suggestions to avoid that connection to the SMSC gets droppped without any traced information?
2- is it possibile to enable some notification when this happens ?

Thanks a lot in advance.
Giuseppe.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2691
Registered: 08-2008
Posted on Monday, December 06, 2010 - 02:47 pm:   

Hi Giuseppe,

If there wasn't any error message on the NowSMS side, then from its perspective, the connection was alive and well at the TCP/IP level.

Unfortunately, most of the SMSCs that use the UCP/EMI protocol have very primitive TCP/IP stacks, so it is not unusual for the SMSC to drop a connection without properly closing it.

In SMPP environments, a special keep-alive packet exists called "enquire link". This is used during idle periods. Most SMPP providers will automatically terminate an SMPP connection if no activity is received within a timeout period (often 60 seconds or lower), and enquire_link is a way that the client signals that it is still connected.

Of course, this type of keep-alive also has a benefit for the client end. If the client doesn't get a proper response back from the server, it can terminate the non-working connection and establish a new connection.

With SMPP, you'll usually have a recommendation from the provider that specifies their enquire link timeout.

However, it's not so clear with the UCP/EMI protocol, as there is no actual "enquire link" or "keep alive" packet.

When you enable the keep-alive option in a UCP connection, NowSMS uses a UCP-31 alert operation that is not commonly used in the UCP protocol, and checks to see that it gets a valid UCP protocol response (even if the response is an error indicating that the command is not implemented). If a valid response is not received, the connection is dropped, and a new connection is established.

Since the use of this operation is not formally defined for this purpose (but it is a fairly widespread practice), I would not set the interval as low as you would in an SMPP environment. Instead, I'd start with 300 to 600 seconds (5 to 10 minutes).

--
Des
NowSMS Support