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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user