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
전문가
답변함 일 년 전
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.

전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠