ERROR: Timeout waiting for response from server or lost connection

ERROR: Timeout waiting for response from server or lost connection SearchSearch
Author Message
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8449
Registered: 10-2002
Posted on Thursday, June 24, 2021 - 08:25 pm:   

A recent message to our support mailbox...

quote:

Hello,

We are facing an issue while connecting to our SMS aggregators SMPP servers which cause queue in nowsms application

Below is a sample from the error



Seeking your urgent support




Hi,

We need more detail to properly troubleshoot. A more complete log file which shows other activity would help us understand if there is a pattern to this unexpected behavior.

It would be extremely helpful to know if this is a problem affecting a small number of messages, or a large number, or ALL messages. If it is not all messages, is there a pattern to the messages that fail, perhaps specific recipients, or particular message attributes such as multipart long messages.

"ERROR: Timeout waiting for response from server or lost connection" indicates that the SMPP provider is unexpectedly terminating the connection.

Why would this happen?

The most common reason would be that the provider has a low “enquire_link” timeout. What does this mean? Think of it as an idle timeout. It means that the provider automatically terminates idle connections after X seconds. In these cases, the SMPP client (NowSMS) is expected to send “enquire_link” packets to keep the connection active. NowSMS defaults to sending these packets every 58 seconds. Timeouts of 60 or 120 are common, and NowSMS defaults to 58, which will prevent a timeout. We’ve seen configurations requiring a setting as low as 5 seconds. For best results, ask the provider what their timeout interval is, and configure NowSMS to use a value that is 1 or 2 seconds less.

Another issue could be that the provider does not support SMPP “async mode”. If this mode is enabled for the connection, try disabling it to see if it resolves the problem.

These issues above would apply if all messages are affected, or if the pattern of messages affected is random.

If the issue persists, what is different about messages that work compared to those that do not? If multipart (long/SAR) messages are a problem, there are a variety of encoding options. Ask your provider about their recommendations for submitting long messages, and we can advise the best settings to meet their recommendations.

Also ask your provider what errors they are seeing from your connection, as it is likely that something is being logged on their end, as it is very unusual to terminate a connection instead of returning a response.

That last thought reminded me of one very unusual case where a customer was encountering this error. Most providers will limit the number of active SMPP connections for an account. Expected behavior is to see login errors if this occurs. But I do recall an incident with one customer where the provider would accept a new connection, but unexpectedly terminate an existing connection. In the windows version of NowSMS, if “receive SMS” is enabled for an SMPP connection, by default, NowSMS will create separate transmitter and receiver connections. In this particular case, only 1 connection was allowed, so NowSMS was continually reconnecting and seeing unexpected dropped connections. There is an option in the SMPP connection settings where you can configure NowSMS to use a single transceiver connection instead of 2 connections. (NowSMS Linux version defaults to single transceiver when defining a new SMPP connection. NowSMS Windows version defaults to 2 connections.)

Regards,

Bryce Norwood
NowSMS Support

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: