why my chatbot is suspended


I have a discord bot but a realised that it is suspended status. When I merge a PR, it triggers deploy on my CI and it makes it active again but aftersometime it goes to suspended mode. why is this happening? it is migrated to V2 automatically it was working fine before.

Hey @user12345

I think you might have auto_stop_machines=true in your fly.toml file.

If your settings look like this:

auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0

then the proxy will stop all your Machines when there’s no traffic to the app, and start them up again when there’s a request.

If you have more than one Machine, then try setting min_machines_running = 1. Or you could set auto_stop_machines=false to disable the feature.

You can read more about the auto start and stop feature here.

1 Like

Hi Andie,

here is my fly config

app = "twilight-frog-9274"

kill_signal = "SIGINT"
kill_timeout = 5
processes = []

  PORT = "8080"

  allowed_public_ports = []
  auto_rollback = true

  http_checks = []
  tcp_checks = []
  script_checks = []
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"

    hard_limit = 25
    soft_limit = 20
    type = "connections"

    handlers = ["tls", "http"]
    port = 443

I don’t have anything regarding auto_stop_machines . So that makes me think after v2 migration default value is true is that correct?

No, the default is auto_stop_machines=false.

Maybe have a look at the logs to see why the app is stopping. Does it stop when idle?

I have following log

2023-06-30T05:15:23.300 app[17811941ce0118] lhr [info] ERROR [fly api proxy] failed to start listener: Address in use (os error 98)

2023-06-30T05:15:23.353 app[17811941ce0118] lhr [info] 2023/06/30 05:15:23 listening on [fdaa:0:3a2a:a7b:13e:c7c1:9a45:2]:22 (DNS: [fdaa::3]:53)

2023-06-30T05:15:24.257 app[17811941ce0118] lhr [info] > fraud@1.0.0 start

2023-06-30T05:15:24.257 app[17811941ce0118] lhr [info] > NODE_ENV=production npm run build && npm run cbinary && npm run cmodel && node build/app.js

2023-06-30T05:15:24.814 app[17811941ce0118] lhr [info] > fraud@1.0.0 build

2023-06-30T05:15:24.814 app[17811941ce0118] lhr [info] > tsc --build

2023-06-30T05:15:25.531 app[17811941ce0118] lhr [info] > fraud@1.0.0 cbinary

2023-06-30T05:15:25.531 app[17811941ce0118] lhr [info] > cp src/main build/main

2023-06-30T05:15:26.060 app[17811941ce0118] lhr [info] > fraud@1.0.0 cmodel

2023-06-30T05:15:26.060 app[17811941ce0118] lhr [info] > cp -r src/my_model build

2023-06-30T05:15:26.306 app[17811941ce0118] lhr [info] INFO Main child exited normally with code: 0

2023-06-30T05:15:26.306 app[17811941ce0118] lhr [info] INFO Starting clean up.

2023-06-30T05:15:26.308 app[17811941ce0118] lhr [info] WARN hallpass exited, pid: 232, status: signal: 15 (SIGTERM)

2023-06-30T05:15:26.315 app[17811941ce0118] lhr [info] 2023/06/30 05:15:26 listening on [fdaa:0:3a2a:a7b:13e:c7c1:9a45:2]:22 (DNS: [fdaa::3]:53)

2023-06-30T05:15:27.309 app[17811941ce0118] lhr [info] [ 4.182768] reboot: Restarting system

2023-06-30T05:15:27.621 runner[17811941ce0118] lhr [info] machine exited with exit code 0, not restarting

it starts when I send command through discord and stops aftersometime that made me think that is something to do with autostop. this software not touched much I haven’t had that issue before

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