Retry Logic for HTTP Conection to SMSC seems to introduce delay in ...

Retry Logic for HTTP Conection to SMSC seems to introduce delay in ... SearchSearch
Author Message
Deepesh Aggarwal
New member
Username: Deepesha

Post Number: 5
Registered: 02-2005
Posted on Wednesday, April 27, 2005 - 01:39 pm:   

Hi Bryce,

I have configured an HTTP based SMSC connection. say 172.21.11.144:5000

In my case instead of SMSC I am using one of my tool which is listening on port 5000 and I run this tool before submittting an MMS message from web Interface to grab the notification and then sends HTTP 200 OK in response for NowSMS to cleanup its queue. I start/stop this tool only for testing my MT stuff.

To ensure an instant mms notification from NowSMS I cleanup Q directory before submitting MMS through Web Interface.

This seesm to be working fine.

Now problem arises if due to some reason there is a pending notification in the Q and NowSMS retries to connect to configured port 5000 but since noone is listening, Its retry logic goes something like: first retry after 20 second then 40 sec then 3 minutes,4,5,6,7,8,9,10,10,10.. and so on..

Now if I run my MT testing say
1. Delete that pending Q
2. Start listening on configured port 5000
3. Submit an MMS through web Interface.

Then NowSMS is not sending the notification instantly because it is waiting for that 10 Minute interval to get over before trying to connect to HTTP port and then it will send that notification foer the latest MMS submission.

So waiting for maximum 10 minutes to receive MM notiifcation is unacceptable in my case.

Do we have any way to configure this retry logic of connecting to HTTP based SMSC?

I know we can configure the retry logic for sending MMS notification. I tried that also but It seems that it is not applicable to this ( SMSC is offline) condition as mentioned in Readme.

* SMS Queue Processing: New configuration options for specifying the retry delays when there is an error submitting a message. (This applies only to errors when NowSMS is able connect to the SMSC or initialise the modem, but an error is returned. This does not apply when the SMSC or modem is off-line.) The following settings can be specified under the [SMSGW] section header of SMSGW.INI: RetryDelay=#### specifies a number of seconds to wait to retry sending after an error condition, the default value is 30. RetryDelayMultiplier=### specifies a multiplier to be applied for successive send failures, the default value is 1. For each failed attempt, the retry delay will be the product of RetryDelay*RetryDelayMultiplier*#FailedAttempts. To use a fixed retry delay of RetryDelay, specify RetryDelayMultiplier=0. RetryDelayAfterAttempts=### specifies that the retry delay should only be applied after ### failed attempts, the default value is 2. NowSMS will immediately retry a failed message send until it has made RetryDelayAfterAttempts, after which it will apply a retry delay. RetryMaxAttempts=### specifies the maximum number of retries that NowSMS will attempt before a message is rejected, the default value is 20.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 4416
Registered: 10-2002
Posted on Wednesday, April 27, 2005 - 05:11 pm:   

Hi Deepesh,

I'm going to investigate to see why we don't use the same retry delay logic for when an SMSC is off-line.

In the meantime, I'm guessing that you have a batch file or script that runs your steps 1-3?

Why not add another step in that script which restarts the service? Issue the following commands:

net stop nowsms
net start nowsms

I'll check to see if we can make some other changes, but that might be a quick solution for your situation.

-bn