Getting timeout with my python script

Hi there,

I was able to deploy it, but my app seems to be restarting a lot.

My logs:

My fly.toml file

# fly.toml file generated for cupom-husky on 2023-02-12T15:46:06-03:00

app = "cupom-husky"
kill_signal = "SIGINT"
kill_timeout = 300
processes = []

  builder = "paketobuildpacks/builder:base"

  PORT = "8080"

  auto_rollback = true

  http_checks = []
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
    hard_limit = 25
    soft_limit = 20
    type = "connections"

    force_https = true
    handlers = ["http"]
    port = 80

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

    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

My Procfile:

web: gunicorn bot_telegram:app

I have tried different approaches, such as changing Procfile to Worker instead of Web, and also server instead of app, but still getting the same problem.

On my machine, it runs for a long time without timeouts.


I figured out how to solve that, in case someone got the same problem.

In the fly.toml I added:

worker = "python"

I also changed the Procfile, but it didn’t seems to make any difference:

worker: gunicorn bot_telegram:app

I find that on this link about rails workers: