SQS messages reappear in queue even after successful execution by lambda.

0

Hi, we have a lambda with SQS as a trigger. we have been seeing spikes (more frequently in the past few weeks) in Oldest message age in SQS so when looked into it we found that SQS messages are reappearing in queue even after successful execution by lambda. but the second time same message with equal message ID reappears and is again successful and now its getting deleted in the queue. this is happening transiently and every time this happens we get a spike in Oldest message age metric. So is it the case that lambda is unable to delete the message in the queue even after successful return? or Is it due to any other reason? Configuration: Lambda timeout : 15min sqs visibility timeout : 15 min Batch size: 1

2回答
0

Please check the following recommendations in the AWS SQS documentation on how to best configure the SQS Queue. https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-queueconfig

AWS
エキスパート
回答済み 1年前
0

Problems like this are usually because the message isn't really being deleted by your Lambda. Have you made sure your exception handling on AWS API calls is solid, and do you have logging for any situations where your message processing or deletion could fail? Depending on traffic you could for example be hitting AWS API request throtting occasionally so make sure your SDK, or you, have retries in place with exponential backoff.

エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ