I also cannot deploy

I have a Remix app too. It gets stuck deploying on the pending step:

2edcec3590a4: Layer already exists 
deployment-1642273869: digest: sha256:f782ef608c3e992ee30c5ea0110c7d18c3ff5d88622c67979515fa4f7a6fba7e size: 3048
--> Pushing image done
image: registry.fly.io/wexpert-dev:deployment-1642273869
image size: 633 MB
==> Creating release
--> release v1 created

--> You can detach the terminal anytime without stopping the deployment
==> Release command detected: npx prisma migrate deploy

--> This release will not be available until the release command succeeds.
Running release task (pending)...⣾ 

Here’s my config file:

app = "my-excellent-app"

kill_signal = "SIGINT"
kill_timeout = 5

[deploy]
  release_command = "npx prisma migrate deploy"

[env]
  FLY = "true"
  NODE_ENV = "production"
  PORT = "8080"
  PRIMARY_REGION = "dfw"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  internal_port = 8080
  protocol = "tcp"
  script_checks = []

  [services.concurrency]
    hard_limit = 200
    soft_limit = 150
    type = "requests"

  [[services.ports]]
    handlers = ["http"]
    port = 80

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

  [[services.tcp_checks]]
    grace_period = "10s"
    interval = "15s"
    restart_limit = 6
    timeout = "2s"

  [[services.http_checks]]
    interval = 10000
    grace_period = "5s"
    method = "get"
    path = "/healthz"
    protocol = "http"
    timeout = 2000
    tls_skip_verify = false
    [services.http_checks.headers]

Of course, the DATABASE_URL for this app was set via fly pg attach, and I can see its digest when I run fly secrets list.

The release job for this is hanging, we’re not sure why! We’re looking and will let you know, I don’t think it’s your code.

1 Like

Ok this is a weird conflict!

It looks like the DB this is attached to is running in dfw, and this app is set to run in lax. We try to run the release commands in the same region as the DB, so the command got a conflicting set of constraints (run only in lax AND only in dfw). I cleared that out and let it run in lax.

Was that intentional? You can move the app to dfw by running:

fly regions set dfw
fly regions backup dfw

That should allow future releases.

2 Likes

Great, thank you! This was not intentional… I assume lax must’ve been a default backup region added to my app. It’s all solved now.

Ok. Thank you for being patient! That’s a really good find, I think we can prevent that next time.

2 Likes

Thank you for your quick customer service… it really makes a world of difference.

1 Like