Strapi: Failing to deploy, hangs and then fails on read/write on closed pipe


I’m experiencing the following issue. In my case, I’m trying to deploy Strapi with

LOG_LEVEL=debug flyctl launch
LOG_LEVEL=debug flyctl deploy


# fly.toml file generated for strapitoheroku on 2022-09-18T07:39:49+01:00

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

  builder = "heroku/buildpacks:20"

  PORT = "1337"

  allowed_public_ports = []
  auto_rollback = true

  http_checks = []
  internal_port = 1337
  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"

It is stuck at “Status: Image is up to date for heroku/heroku:20-cnb” and with LOG_LEVEL=debug enabled:


I’ve tried flyctl wireguard websockets enable as suggested however that doesn’t seem to make a difference.

When viewing the builder logs, it repeatedly shows:

and each time this occurs it seems that it will eventually fail.

Eventually this builder becomes suspended and final output is:

The deploy script eventually outputs:


I’ve seen various issues raised and even documentation including:

What have I tried?

  • flyctl wireguard websockets enable
  • Changing networks

My thoughts are that given the repeated output by the builder each time that it will likely fail unless there is some other reason. I intend on exploring the approach as mentioned above of what I have not tried. I’m interested however in knowing the approach I am trying should work.

Thank you for your help!

Creating Dockfile and configuring Fly to use that.

Thanks to Deployment - Strapi Developer Docs