Fly Machine Restart Loop

I’m trying to use a Fly machine to run two services in a single machine. Both are simple rest APIs. One service listens on port 3000, the other on 5173. The service on 3000 starts the other service as a child process.

This seems to work great, but I’m running into an issue. Every few minutes, the VM restarts on it’s own. The logs look something like:

[info] INFO Sending signal SIGINT to main child process w/ PID 629

It doesn’t look like this is an application error, I don’t see anything in the logs where something in my services failed. My fly.toml is below, there must be something that I’m missing.

app = 'my_app'

[build]

[[services]]
  processes = ["app"]
  internal_port = 3000
  protocol = "tcp"
  auto_stop_machines = "off"
  auto_start_machines = false
  min_machines_running = 0

  [[services.ports]]
    handlers = ["tls", "http"]
    port = "3000"

[[services]]
  processes = ["app"]
  internal_port = 5173
  protocol = "tcp"
  auto_stop_machines = "off"
  auto_start_machines = false
  min_machines_running = 0

  [[services.ports]]
    handlers = ["tls", "http"]
    port = "5173"

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1

Looking at the machine metrics, it doesn’t look like I’m anywhere close to running out of memory or CPU. Any ideas?

Hm… The “few minutes” suggests that it might be this new mechanism, gone slightly haywire:

https://community.fly.io/t/app-is-being-suspended-even-though-i-have-auto-stop-machines-set-to-off-in-fly-toml/24578

(It’s supposed to stop rather than restart, though—if I understand correctly.)

Turns out this was an issue in our application code after all, just in our orchestration code rather than the VM code itself.

1 Like

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