Score:0

SQS is not working for multiple ECS (fargate) instances

us flag
aks

I am using an application load balancer, under this ALB, a target group is provided. In this target group, two fargate ECS instances are running. These two instances use the same PHP docker image. When i upload an csv file, the tasks in the csv file will be moved to the SQS. Here the tasks are not passing to the SQS and no error messages were showing.So i changed the ECS instance number to 1 ( initially it was 2) then SQS is working fine. So how do i resolve this issue for multiple ECS containers. ECS cluster SQS

cn flag
So you upload the file via PHP, and then the ECS task processes it and writes to SQS? But it's not working with multiple ECS tasks?
cn flag
You'll need to try and find some logs to make this answerable.
aks avatar
us flag
aks
@shearn89 ok..but SQS is not generating any logs and cloudwatch also not showing any SQS related logs. For me it's working for the single ECS container.
cn flag
What does the container say when you run 2 instances? Is there a clash because they're using the same ID that has to be unique or something?
Tim avatar
gp flag
Tim
When you say "So i changed the ECS instance number to 1" do you mean you terminated one of the two containers so only one was remaining? This would not affect the ability to use SQS, I think something else is going on here you haven't found yet. Check the ECS role has access to SQS (likely fine).
aks avatar
us flag
aks
@Tim ECS has SQS access and the SQS is working completely for single ECS container. The problem is related to the use of multiple ECS tasks.
gshpychka avatar
mx flag
What does "upload a csv file" mean? What's the source code of your containers?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.