ECS Fargate container running ASP.NET image not garbage collecting
I have an ECS Fargate task running an ASP.NET image and I have noticed that it keeps failing due to OOM exception. I can look in CloudWatch and the memory keeps increasing. When I run in a local docker container, I can see that the garbage collector is running correctly and there is no memory problem. I have seen people suggest to set Server GC to false, but I'm not sure if that is the problem. From what I have read this should have been fixed in previous versions (I am using asp.net 5). Is this expected and is the correct approach to set this to false?
I will suggest to consider fine tuning web.config https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/web-config?view=aspnetcore-5.0
You may want considering hands-on help by partners to dig into issue.
no, there is no known issue. However, if there are dangling references, GC has no way to cleanup. I'll suggest to look into code. Profiling may help
I mentioned that this is not been in a local docker container. GC works just fine, which is what is leading me to think it's an ECS issue or at least difference
Relevant questions
Which role do I have to use for the Fargate tasks on AWS Batch?
Accepted Answerasked 5 months agoUnable to run ECS Task using image from ECR
asked 9 months agoCannot load anything other than root request -- ECS + ECR + ALB 503s
asked 2 years agoOverriding Hostname on ECS Fargate
Accepted Answerasked 3 months agoWhat needs to be done to make event bridge invoke a fargate task when file added to s3
asked 22 days agoECS Fargate container running ASP.NET image not garbage collecting
asked 24 days agodefining the name of task definition json to run ecs task in github actions
asked 2 years agoRDS DB migrations using ECS and Fargate
asked 2 years agoDelayed shutdown of ECS Fargate tasks?
asked 4 months agoECS Fargate - How to get IP Address
Accepted Answerasked 4 months ago
That is where I have seen the ability to turn off server garbage collection. Do you know if this is a known issue?