akraut

akraut

Debugging Ecto connections to remote Postgres servers in Mix tasks

Hey folks, I’m trying to use Ecto with Neon’s hosted Postgres service. Notably, this necessitates the use of SNI to connect to the right server.

My config.exs looks like this:

import Config

config :friends, Friends.Repo,
  url: "postgres://application:nunyabidn355@ep-still-thunder-16014280.us-west-2.aws.neon.tech/friends?options=project%3Dep-still-thunder-16014280",
  # database: "friends",
  # username: "application",
  # password: "nunyabidn355",
  # hostname: "ep-still-thunder-16014280.us-west-2.aws.neon.tech",
  # port: 5432,
  ssl: true,
  ssl_opts: [
    server_name_indication: 'ep-still-thunder-16014280.us-west-2.aws.neon.tech',
    verify: :verify_none
  ]

config :friends, ecto_repos: [Friends.Repo]

mix ecto.create reports a cryptic ** (Mix) The database for Friends.Repo couldn't be created: killed and mix ecto.migrate simply reports ** (EXIT from #PID<0.99.0>) shutdown.

So, the real question I have is, how do I coerce mix into giving me some debug output so I can see what’s actually going on? In other words, I’m not interested in the answer to what’s happening here; instead I’m interested in how I might arrive at that answer myself.

First Post!

mars

mars

Did you discover a solution to debugging this? I seem to be in the same situation.

Current vibe: xkcd: Wisdom of the Ancients

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement