504 timeout error on EC2 instance inside ECS cluster on same time daily

0

We are facing very weird situation in ECS cluster. ECS tasks minimum is 6 and max count is 40.
Task defination : "cpu": "1600", "memory": "2048",

Every day at same time people are login to system or application one or two instance getting higher utilisation 90% so we are getting 504 timeout error for each application API request. We check container log didn't find any error causing issue. Request which is getting timeout later if we tried it works sometime. So nothing is do with particular request causing issue.

What could be issue ? We are struggling to get rid of this issue from 5 months.

1 個回答
1

If you have ALB logging enabled then I would use the logs to find which container is returning the 504

Then dig deeper into the application. It may be the container is overloaded and out of available http connections at that time or not enough threads.

You’d need to look at tuning your app.

profile picture
專家
已回答 6 個月前
  • I checked container log didn't find any. Metrics for CPU usage is high on issue time.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南