0

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

aks
  • 37
  • 1
  • 6
  • 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? – shearn89 Mar 08 '22 at 12:55
  • You'll need to try and find some logs to make this answerable. – shearn89 Mar 08 '22 at 12:55
  • @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. – aks Mar 08 '22 at 13:03
  • 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? – shearn89 Mar 08 '22 at 14:05
  • 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). – Tim Mar 08 '22 at 17:45
  • @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. – aks Mar 09 '22 at 02:55
  • What does "upload a csv file" mean? What's the source code of your containers? – gshpychka Apr 04 '22 at 18:00

0 Answers0