Answers: <blockquote>
    <p><em>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</em></p>
  </blockquote>
  
  <p>Yes, it looks like there was.</p>
  
  <p>But first, be sure you have the correct <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html" rel="nofollow noreferrer">definitions</a> in mind for these metrics, because your intuitive interpretation might be reversed.</p>
  
  <p>"Sent" means <em>sent to SQS and added to the queue</em> (it does not mean sent to consumers) and "received" means <em>delivered to a consumer</em> (it does not mean received by SQS).</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Theoretically, it <em>could</em> 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.</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-01-04T20:38:19.450Z
Answers: 2020-01-04T20:38:19.450Z
Answers: Michael - sqlbot
Body: <p>I'm new to SQS.</p>
  <p>I recently noticed the <code>ApproximateNumberOfMessagesVisible</code> 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.</p>
  <h3><code>NumberOfMessagesSent</code></h3>
  <p><a href="https://i.sstatic.net/e2K0H.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/e2K0H.png" alt="NumberOfMessagesSent" /></a></p>
  <h3><code>NumberOfMessagesReceived</code></h3>
  <p><a href="https://i.sstatic.net/EYgaC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/EYgaC.png" alt="NumberOfMessagesReceived" /></a></p>
  <h3><code>NumberOfMessagesDeleted</code></h3>
  <p><a href="https://i.sstatic.net/DaCUr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DaCUr.png" alt="NumberOfMessagesDeleted" /></a></p>
  <h3><code>ApproximateNumberOfMessagesVisible</code></h3>
  <p><a href="https://i.sstatic.net/lpDfm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lpDfm.png" alt="ApproximateNumberOfMessagesVisible" /></a></p>
  <p>Increasing the number of SQS workers temporarily drained this queue, but what could be possible reasons for this increase?</p>
  
Tags: <amazon-web-services><monitoring><amazon-sqs>
Title: SQS: What could high number of visible messages mean if messages received & deleted are normal?
UserDisplayName: Shubham Kanodia
ThreadText: # SQS: What could high number of visible messages mean if messages received & deleted are normal?
  
  (Asked by: username_0 on 2020-01-04)
  
  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](https://i.sstatic.net/e2K0H.png)](https://i.sstatic.net/e2K0H.png)
  
  ### `NumberOfMessagesReceived`
  
  [![NumberOfMessagesReceived](https://i.sstatic.net/EYgaC.png)](https://i.sstatic.net/EYgaC.png)
  
  ### `NumberOfMessagesDeleted`
  
  [![NumberOfMessagesDeleted](https://i.sstatic.net/DaCUr.png)](https://i.sstatic.net/DaCUr.png)
  
  ### `ApproximateNumberOfMessagesVisible`
  
  [![ApproximateNumberOfMessagesVisible](https://i.sstatic.net/lpDfm.png)](https://i.sstatic.net/lpDfm.png)
  
  Increasing the number of SQS workers temporarily drained this queue, but what could be possible reasons for this increase?
  
  **Tags:** amazon-web-services, monitoring, amazon-sqs
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-04. Score: 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html) 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.
  
  
  ---
  
  