How to avoid: "Request throttled because message visibility configuration was updated too recently."

0

I am getting the following error when calling ChangeMessageVisibility:

Request throttled because message visibility configuration was updated too recently.

I can't find anything on google or on here as to how to fix this. I've tried waiting up to 43 seconds after creating the queue to see if calls to ChangeMessageVisibility have to occur after the (30 second) VisibilityTimeout setting itself, but no dice. The FIFO in question is created in an automated (pytest) fixture and all of the other ways we use that fixture work great. It's just this call to ChangeMessageVisibility.

How can I fix this? Thanks!

질문됨 2년 전483회 조회
1개 답변
0

Silly question: Are you definitely calling the ChangeMessageVisibility API for a message or trying to change the default VisibilityTimeout by calling SetQueueAttributes? Because the error message implies that that it is the queue configuration that is being changed, not the message visibility.

That said: Information that is missing that would be handy: What's the default message visibility timeout for the queue? What are you setting the message visibility to? How often are you doing that?

I ask because: If you have delays in your processing that are happening frequently, maybe it's a sign to change the default message visibility in the queue or to set the individual message visibility a lot higher rather than trying to set it a lot of times.

profile pictureAWS
전문가
답변함 2년 전
  • Thanks for your reply. I am getting the error when calling queue.change_message_visibility_batch(). The queue object is created like this:

        incoming = client.create_queue(
            QueueName="TEST-INCOMING.fifo",
            Attributes={"FifoQueue": "true", "ContentBasedDeduplication": "false", "VisibilityTimeout": "30"},
        )
    

    Putting back messages is a slight but important edge case for us when a customer is tearing down their account while an SQS consumer is also processing messages for that account.

    Does that answer your questions?

  • I'm running into the same situation. Using Change Message Visibility Batch API (via .NET SDK). It is also a FIFO queue. We pull off a batch of 10, determine if any of those messages can be consolidated, and handle them, then "put the rest back" (by changing the message visibility on the messages back to zero). We are getting this error intermittently.

    The full error I get is:

    Request throttled because message visibility configuration was updated too recently. Wait a short while and then retry the operation.

    What is the "short while" we should wait?

    What's the default message visibility timeout for the queue? 15 minutes What are you setting the message visibility to? Zero How often are you doing that? Varies, sometimes may be as quick as a few seconds.

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

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

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

관련 콘텐츠