toml: key processes should be a table, not a value

I’m having an issue deploying my Django app all of a sudden where I get an error :

Error: failed loading app config from /home/runner/work/Teahookup/Teahookup/app/fly.toml: toml: key processes should be a table, not a value

I’m not sure why, as I have had successful deployments with this .toml file using GitHub Actions just a week ago. Did something change?

The action:

- run: flyctl deploy --remote-only
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

The .toml:

# fly.toml file generated for tealist on 2023-03-11T10:14:22-06:00

app = "tealist"
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "ord"
processes = []

  release_command = "python migrate"

  PORT = "8000"

  auto_rollback = true

  web = "sh /code/scripts/"

  http_checks = []
  internal_port = 8000
  processes = ["web"]
  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"

  guest_path = "/code/static"
  url_prefix = "/static/"

I did update the processes a few weeks ago per this article but I have had 2-3 successful deployments since. I haven’t made any additional changes to the .toml, but did make changes to the app files.

Edit: I get the same error when trying to run fly ssh console from the app directory w/ the .toml file.

Hi… This line is the culprit, I think.

flyctl’s TOML handling did change recently, and it may now be stricter about some things.

From General to Build debugging

Added flyctl

It looks essentially the same as an example in the official docs - Running Multiple Processes Inside A App · Fly Docs

I’ve done some testing and if I remove:

  web = "sh /code/scripts/"

And change

processes = ["web"]


processes = ["app"]

Then it starts to validate correctly. However, if I only change processes to app and leave the the [processes] table in, it still fails to validate.

And if I try to skip the processes assignment and declare the script directly under the service, then it tells me to update a [processes] table like I was doing.

processes = ["sh /code/scripts/"]

Service specifies ‘sh /code/scripts/’ as one of its processes, but no processes are defined with that name; update fly.toml [processes] to add ‘sh /code/scripts/’ process or remove it from service’s processes list

I may have figured it out… I had a processes = at the top of the .toml so I’m guessing it read a blank processes table first, then failed. Deleting that resolves the validation locally, I’ll try to deploy again.

Edit: Yup, the redundant processes = was the issue. I guess the new .toml validation changed that behavior.

1 Like

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