Deployment fails here and there

Hey @flyio3! Sorry to see you’ve been struggling here. I’d love to help get this resolved if I can so we can improve the docs or whatever else is needed to make it better for you and others.

So let me restate what I understand the setup to be… please correct where I’m wrong.

  • You are hosting a single application instance
  • You are hosting it in syd
  • You have a single postgres database in syd (not using read-replicas)
  • Are you using Phoenix 1.6 with esbuild? I ask because the application is generated differently more recently.
  • You aren’t using the fly_postgres hex package (just making sure)
  • The DATABASE_URL is set (fly secrets list)

Sometimes the logs can provide more information. When that happens, just run fly logs to see if there’s any more info there.

When I’ve seen this problem, it’s generally because one of the following:

  • a missing inet6 config for IPv6 support (app can’t see the database)
  • It’s multi-region and the app doesn’t know what the primary region is supposed to be
  • It’s multi-region and the app is being started in a backup region which doesn’t have the database

Does any of that apply?

sorry, this has all been sorted, there was downtime on one of your services while this was happening which compounded with some issues I was having by using podman to build the images, I’ve switched to using debian:slim as a base image and no longer have any issues with regards to DNS - so I assume it was something to do with the alpine image having DNS issues when built with podman.

1 Like

@paolo.marino does any of this apply to the problem you’re having? Deployment fails here and there - #21 by brainlid

Hey! some of those. The app has been deployed there for a week or so with no issues and I haven’t made any big changes to the config.

I tried to deploy it again today and the deploy step worked, so migrations run, but now the deployed app cannot connect to the database anymore which in turns was working before the deploy.

Just want to say that your fly_postgres hex package is amazing, along with your elixir conf talk. Learned about them both here and have subsequently updated to be multi-region with PostgreSQL. Thank you!

1 Like

Thanks @mmark!

There is a new version of the fly_postgres library that I need to release. Just haven’t had time to finalize some things. Would love early testers on that when it’s ready!

1 Like

Awesome! Totally, any way I can help just let me know.