-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batch_send does not account for SQS 256kb batch size limit #663
Comments
I could use some help understanding a little bit more of the context. Did you write a Shoryuken worker whose job it is to republish messages to a new queue? How is that worker configured (what Something like this? class MoveMesasgeWorker < Shoryuken::Worker
shoryuken_options batch: true
def perform(sqs_messages, _)
Shoryuken.sqs_client.send_message_batch queue_url: queue_url,
entries: sqs_messages
end
end |
We're actually manually starting it through our own CLI. Behind the scenes it's spinning up a single ECS task and then running the
Number of slices is the We tried capturing the output and if the |
Thanks for that clarification! It all makes sense. It definitely seems like a legitimate bug with I think the ideal solution would be for I saw you opened #661. Is that ready for review? |
I accidentally opened that pr that was meant for our fork. #664 Here's the real one! Thank you! |
Fixed by #664 |
A fix for this issue was deployed as part of Shoryuken 5.2.1 |
Hello!
I am having issues moving messages from one queue to another. Sometimes messages are nearly as large as the 256kb batch limit enforced by AWS SQS.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html
This limit causes this failure to occur in batch_send :
Aws::SQS::Errors::BatchRequestTooLong: Batch requests cannot be longer than 262144 bytes. You have sent 1024000 bytes.
When this error occurs the messages are still considered "in flight" and will only become available again after a timeout. This makes it difficult to retry the failed batches in smaller sizes later because the queue will appear to be empty.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
The text was updated successfully, but these errors were encountered: