diff --git a/fly.toml b/fly.toml index 4d96844..6d7a191 100644 --- a/fly.toml +++ b/fly.toml @@ -1,5 +1,5 @@ +# fly.toml app = "postconvert" - primary_region = "sjc" [build] @@ -8,11 +8,16 @@ primary_region = "sjc" [http_service] internal_port = 8080 force_https = true + auto_start_machines = true auto_stop_machines = true min_machines_running = 0 - max_machines_running = 1 - concurrency = { soft_limit = 1, hard_limit = 1 } + max_machines_running = 10 + + # Allow 2 concurrent connections so /health can succeed while /convert is running. + # We enforce "only 1 conversion at a time" in server.js. + concurrency = { soft_limit = 2, hard_limit = 2 } + grace_period = "30s" [[http_service.checks]] @@ -20,4 +25,4 @@ primary_region = "sjc" interval = "15s" method = "GET" path = "/health" - timeout = "2s" + timeout = "5s"