0

I'm new to SQS.

I recently noticed the ApproximateNumberOfMessagesVisible in my SQS queue started rising. What was interesting though is that there was no sudden surge in the number of messages received or depression in number of messaged being deleted from the queue that corresponds with this surge.

NumberOfMessagesSent

NumberOfMessagesSent

NumberOfMessagesReceived

NumberOfMessagesReceived

NumberOfMessagesDeleted

NumberOfMessagesDeleted

ApproximateNumberOfMessagesVisible

ApproximateNumberOfMessagesVisible

Increasing the number of SQS workers temporarily drained this queue, but what could be possible reasons for this increase?

2

there was no sudden surge in the number of messages received or depression in number of messaged being deleted from the queue that corresponds with this surge

Yes, it looks like there was.

But first, be sure you have the correct definitions in mind for these metrics, because your intuitive interpretation might be reversed.

"Sent" means sent to SQS and added to the queue (it does not mean sent to consumers) and "received" means delivered to a consumer (it does not mean received by SQS).

Beginning at approximately 1600 on January 3 there is an unexplained dip in "received" performance. The consumers slowed down and accepted messages at a slower rate, despite the fact that the available messages did not justify that reduction, suggesting that the consumers were not able to process messages at their typical rate.

Beyond this point, the messages "sent" (enqueued) continued its undulating pattern, but the messages "received" (dequeued) and "deleted" (after processing) assumed a much flatter pattern, despite the fact that they had previously been following the same visual pattern as the "sent" value.

It appears that your consumers have slowed down, for external reasons (probably unrelated to SQS -- something else the consumers communicate with, like maybe a database, is not responding as quickly as usual), and so the consumers are no longer able to keep up with the offered workload, and a backlog is growing. "Visible" messages are the messages in the queue that are waiting for an available consumer to be ready to receive them.

Theoretically, it could be that this is an internal performance problem inside SQS, but this seems very unlikely so I'd suggest that your consumers and the components of your stack that they interact with should be the focus of your troubleshooting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.