Skip to content

Commit

Permalink
Increase the grace period on ECS
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai committed Sep 12, 2024
1 parent a70a750 commit e6499b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions distribution/ecs/quickwit/quickwit-indexer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ module "quickwit_indexer" {
enable_cloudwatch_logging = var.enable_cloudwatch_logging
service_config = var.quickwit_indexer
quickwit_index_s3_prefix = local.quickwit_index_s3_prefix
# Longer termination grace period for indexers because their ingest services
# need to commit their WALs. Should be larger than the largest commit timeout.
stop_timeout = 120
}

resource "aws_service_discovery_service" "indexer" {
Expand Down
2 changes: 2 additions & 0 deletions distribution/ecs/quickwit/service/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ module "quickwit_service" {
}
]

stopTimeout = var.stop_timeout

dependencies = var.sidecar_container_dependencies
}
})
Expand Down
5 changes: 5 additions & 0 deletions distribution/ecs/quickwit/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ variable "task_execution_policy_arn" {}
variable "quickwit_cpu_architecture" {}

variable "module_id" {}

variable "stop_timeout" {
# between 1s and 120s on Fargate, 30s is the ECS default
default = 30
}

0 comments on commit e6499b3

Please sign in to comment.