Large number of SMS queued .....

Large number of SMS queued ..... SearchSearch
Author Message
Nelson Lam
New member
Username: Nelsonlam

Post Number: 18
Registered: 02-2013
Posted on Monday, December 16, 2013 - 11:26 am:   

Hi Des,

Sometimes we find over 1000 SMS that are pending on the queue.

When we view from the "Service" Tab "Outbound SMS Queue-->View",
all SMS queued are marked with status "Queued"

When we viewed the queue at 18:30, we found lots of SMS staying
in the queue that were submitted at 14:00. Those SMS are pending far too
long on the queue.

Currently we have the following setting:
- we are using NowSMS version 2013.09.26v
- inbound SMS from 1 sms-user that are submitting SMS to NowSMS
- we use accounting callback to route sms to SMSC setup in SMSC-connections
under NowSMS
- we have 3 outbound SMSC defined where
>> SMSC-A is primary route
>> SMSC-B is set to "ReRouteOnError" when error encounter by SMSC-A
>> SMSC-C is set to "BackupForRoute=SMSC-A"

SMSGW.INI
:
[SMPP - 1.1.1.1:8001]
RouteName=SMSC-A
:
ReRouteOnError=SMSC-B
[SMPP - 2.2.2.2:8002]
RouteName=SMSC-B
:
:
[SMPP - 3.3.3.3:8003]
RouteName=SMSC-C
:
BackupForRoute=SMPP - 1.1.1.1:8001
:

We will send the SMSDEBUG.log separately.

Pls help to check if "ReRouteOnError" and "BackupForRoute" will cause
pending SMS problem.

Thanks.

Best Regards
Nelson
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4777
Registered: 08-2008
Posted on Friday, December 20, 2013 - 04:09 pm:   

Follow-up ...

Nelson and I exchanged some e-mail messages and logs on this issue.

I haven't heard back from him for several days, so I can't be certain that the problem is resolved. However, we did identify a problem scenario that could cause some messages to be stuck in the outbound queue for several hours, like he described. Therefore, I am posting details here for others who might experience similar problems.

If all of the stuck messages are segments of multipart messages (ID starts with "SAR"), and you are using accounting callbacks to route messages, delays of this nature if an accounting callback routes different segments of the same message to different routes.

For example, if an accounting callback is doing "round-robin" load balancing to split messages between routes, a problem can occur if multiple segments of the same message are routed to different routes. (As an alternative, it is possible to define several SMSC connections in NowSMS with the same route name, and NowSMS will load balance across the connections, although distribution is not guaranteed to be equal.)

The problem occurs because NowSMS tries to group segments of multipart messages so that they are routed via the same connection. (If you look at the files in the Q directory, there are LCK files associated with the messages. These files record that an earlier segment was sent via a particular connection.)

If an accounting callback causes different segments of a multipart message to different routes, this causes confusion.

NowSMS will automatically delete the LCK files automatically and release the messages, but only once per hour. So messages should not be stuck forever, but they will be stuck for 2-3 hours.

There are 2 ways to address this problem:

1. Add DisableLongMessageSMSCCheck=Yes to the [SMSGW] section of SMSGW.INI. This stops NowSMS from trying to route segments of a multipart message via the same connection. (No more LCK files are generated.)

2. Alternatively, let NowSMS do its own load balancing. Multiple SMSCs can use the same route name and NowSMS will load balance over those connections automatically. It will not be the same exact message count over each connection, but the first available connection will be used for each message.

--
Des
NowSMS Support
Nelson Lam
New member
Username: Nelsonlam

Post Number: 19
Registered: 02-2013
Posted on Friday, December 27, 2013 - 05:10 am:   

Dear Des

Sorry for my late response.

Your suggestion is exactly what we are looking for.
Those messages stuck on the queue for several hours are segments of
concatenate SMS which we route to 2 different SMSC using 2 different route name.

After adding "DisableLongMessageSMSCCheck=Yes", the messages staying on
on the outbound queue are clearing up rapidly and no more messages get
stuck on the Queue.

Thanks for your help.

Best Regards
Nelson