Configure nofiles ulimit in Terraform ECS task (#3249)

The low default ulimit `nofiles` value (`4096`) in Fargate was observed
to cause errors when running with a large number of hosts and a small
number of servers. Each server should be able to server more than 4096
simultaneous clients.
This commit is contained in:
Zach Wasserman 2021-12-08 15:08:48 -08:00 committed by GitHub
parent d0765cb9ee
commit a6d60cc193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,6 +147,13 @@ resource "aws_ecs_task_definition" "backend" {
awslogs-stream-prefix = "fleet"
}
},
ulimits = [
{
name = "nofile"
softLimit = 999999
hardLimit = 999999
}
],
secrets = [
{
name = "FLEET_MYSQL_PASSWORD"
@ -352,4 +359,4 @@ output "fleet_ecs_cluster_arn" {
output "fleet_ecs_cluster_id" {
value = aws_ecs_cluster.fleet.id
}
}