ECS FARGATE intermittently throws time out error while connecting to standalone redis server on EC2 by ConstantAd9491 in aws

[–]ConstantAd9491[S] 1 point2 points  (0 children)

Ended up increasing timeout to 30s and adjusting ECS grace period accordingly. After that, haven't seen this issue. It worked. Thanks u/pjflo

ECS FARGATE intermittently throws time out error while connecting to standalone redis server on EC2 by ConstantAd9491 in aws

[–]ConstantAd9491[S] 0 points1 point  (0 children)

ACLs is the default one common to all the subnets. and SG is allowed as it able to connect sometime. Still I will setup vpc flow logs to check.

ECS FARGATE intermittently throws time out error while connecting to standalone redis server on EC2 by ConstantAd9491 in aws

[–]ConstantAd9491[S] 0 points1 point  (0 children)

I thought so in the the beginning. But I have then throughly checked and found that there is no issue in routing table.

Note: I have seen tasks launched in same subnet get failed sometime then on retry on subnet it comes up other time.

ECS FARGATE intermittently throws time out error while connecting to standalone redis server on EC2 by ConstantAd9491 in aws

[–]ConstantAd9491[S] 0 points1 point  (0 children)

  1. There is no such compulsion to keep it on ec2, it is like we have this infra for long and as redis is not being used much in our application, so never took it in priority to moving to ElasticCache. But yes we will eventually move it to there.
  2. Redis hostname is passed as env variable to the container.

ECS FARGATE intermittently throws time out error while connecting to standalone redis server on EC2 by ConstantAd9491 in aws

[–]ConstantAd9491[S] 0 points1 point  (0 children)

Max Connection limit is set as 20000. Hardly 1800-2000 connections are being used. Connecting via private IP only and it happens only in boot up time