Here is the piece of code :
//Publishing the topic
snsClient.Publish(new PublishRequest
{
Subject = Constants.SNSTopicMessage,
Message = snsMessageObj.ToString(),
TopicArn = Settings.TopicArn
});
I am getting the below error :
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
And here is the screenshot of detailed error:
But not able to get an idea how to solve this. Any hint or link will helpful.
Sign in to the Amazon SNS console . In the left navigation pane, choose Topics. On the Topics page, select a topic, and then choose Publish message. The console opens the Publish message to topic page.
Today, we are increasing the maximum allowed payload size for the Amazon Simple Queue Service (SQS) and the Amazon Simple Notification Service (SNS) from 64 KB to 256 KB.
When the delivery policy is exhausted, Amazon SNS stops retrying the delivery and discards the message—unless a dead-letter queue is attached to the subscription. For more information, see Amazon SNS dead-letter queues (DLQs).
Q: Does Amazon SNS guarantee that messages are delivered to the subscribed endpoint? Yes, as long as the subscribed endpoint is accessible. A message delivery fails when Amazon SNS can't access a subscribed endpoint, due to either a client-side or a server-side error.
We had the exact same issue happen to us. We got this error about 40 times a day, which was less than 0.1% of the successful push notifications we sent out.
Our solution? Update the AWSSDK NuGet package from 1.5.30.1 to 2.3.52.0 (the latest v2 release for ease-of-upgrade). As soon as we updated, the errors stopped happening. I looked through lots of release notes and couldn't find anything specifically mentioning this issue. We have no idea why the update worked, but it did.
I hope this helps you and anyone else fix this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With