Multiple machines spinning up and crashing, etc.

Hey there,
So I have a simple application that needs to be running at least machine for performance reasons, but it seems to always have 2 machines running, one of which is always starting up and shutting down.

The app is unreliable, but there is nothing in logging that would suggest its an application error so I suspect something is wrong on the FLY config side… here is my TOML file:

pp = "my-app"
primary_region = "lax"

[build]
build-target = "fiction-sites"
dockerfile = "./Dockerfile"

[deploy]
strategy = "bluegreen"

[http_service]
auto_start_machines = true
auto_stop_machines = true
force_https = true
internal_port = 6_565
min_machines_running = 1
processes = [ "app" ]

  [[http_service.checks]]
  grace_period = "10s"
  interval = "30s"
  method = "GET"
  path = "/"
  timeout = "8s"
  tls_skip_verify = false

[[vm]]
memory = "4gb"
size = "shared-cpu-2x"

and here is the basic analytics of what’s happening:

and here is machines right now:

This is normal!

You have auto_stop_machines = true and min_machines_running = 1. The second machine starts and stops based on demand and requests. The first one remains up all the time because of min_machines_running.

Got it, ok but why isn’t the first machine (that is always running) handling the requests?

can someone point me to a solid tutorial on how this all works in practice? e.g. with examples… the docs go over what each option does, but doesn’t tie anything to reality.

Anyone doing support for this company?

Hi @arpowers! Are you on the Launch plan (or higher)? If so, I’d highly recommend emailing our Support team using your organization-specific email address (typically <org-name>@support.fly.io). We’d be happy to help you directly there.

1 Like

Sent an email 3 days ago. No response.

How am i supposed to get answers? This should be a simple problem as our devops setup isn’t complicated…

Apologies for missing your initial email. We’ve since responded - please let us know if you have any follow-up questions or continue running into issues. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.