shahryarjb
Hello, I want to create an action for my elixir project, but I can not connect to PSQL database
Error: 9.650 [error] GenServer #PID<0.755.0> terminating
** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused
(db_connection 2.4.1) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
Error: 9.668 [error] GenServer #PID<0.761.0> terminating
** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused
(db_connection 2.4.1) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for MishkaDatabase.Repo couldn't be created: killed
Error: Process completed with exit code 1.
As you see I have this error connection refused - :econnrefused
This is my CI yml
https://github.com/shahryarjb/mishka-cms/blob/master/.github/workflows/ci.yml
And this is my test config file:
https://github.com/shahryarjb/mishka-cms/blob/master/config/test.exs
And you can see the last failed action in this repository, thank you, and please help me to fix it
Trending in Questions
One of my LiveView view’s has a very heavy javascript dependency so I want to avoid loading it for every page on the site, while still us...
New
Hi all!
I know that quite a few people use Phoenix LiveView but it is hard to get a more up-to-date list of folks/companies using it. I ...
New
Hello everyone!
I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++.
Does anyone ...
New
I load tested a plain Phoenix chat app backed by Postgres with 100 million messages in it, everything on default settings, to see what br...
New
Hey, I know this has been discussed ad nauseum, but I couldn’t find a definitive answer or at least some consensus around this, so let me...
New
I don’t suppose you can lazy load a library depending on runtime data? For example if it’s a certain user they can lazy load ‘library A’ ...
New
Hey everyone, I have been building a lightweight Phoenix backend aimed at backing up and synchronizing user profiles across mobile device...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
On November 23, 2026, an unauthorized third party exploited a vulnerability in hex.pm (CVE-2026-129514, CVSS 10.0) that let them run comm...
New
Hi everyone :waving_hand:
I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #code-sync
- #exunit
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #ai
- #authentication
- #elixirconf-us
- #umbrella
- #full-time-contract
- #blog-post
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-eu
- #distillery
- #security
- #processes
- #api
- #forms
- #hex











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
shahryarjb
I changed my port and it works, but I got this error instead of pervious error in my tests, I don’t have this error in my docker
I add it
socket_dir: "/var/run/postgres",to my Ecto config, but I have this error, I think it is nor current pathI changed my
ymland made it like GitHub document, but I have this erroral2o3cr
You’d only use the socket option if you were running the code on the same machine as the database, which isn’t the case here.
The example on that linked Github doc that uses
portslike theci.ymlin your repo does is the “running jobs directly on the worker machine” which setsPOSTGRES_HOSTtolocalhostand relies on Docker’s port forwarding to connect the containers.shahryarjb
Hello Dear @al2o3cr,
I tried everything I thought might it work.
For example
This is how I introduced Elixir
and for my elixir source, I want to connect it to a Postgres database, so I added a
14.1-alpineThen I did like GitHub sample without port after preparing database as a service
Then I have this error:
but if I do like the other part, I mean the link you sheared: Creating PostgreSQL service containers - GitHub Docs
I edited like this and added port :
and added these lines:
With these changes, I could pass the migration part, but in the test section I got error from database
I added
show_sensitive_data_on_connection_error: trueto see more informationAll lines of my CI:
I created a simple elixir application you can access to it (click please) and see all the CI code
I do not know how to fix this, I tried many ways
please help me to figure out
shahryarjb
If I create it like this, it works for me, but I can’t check multi version of elixir and Erlang in a job
shahryarjb
Hello, I fixed all the pervious errors, In testing I have a problem that it shows me
undefined_table, but this table exists and I have no problem in my local and server with these packages.Hence, I tried to drop and migrate again, but it always shows me
I have written these line before, and I have dropped the dB before migration
https://github.com/shahryarjb/mishka-cms/blob/master/.github/workflows/ci.yml#L91-L94
Please help me to fix this
Thank you
Update
I fixed it with some changes in my config and deleting
MIX_ENV=testshahryarjb
Hello Friends,
I have
postgresserror in my new project’s GitHubciagain.Error
error ref: https://github.com/shahryarjb/ChatFCoin/runs/6079339322?check_suite_focus=true
My GitHub CI:
https://github.com/shahryarjb/ChatFCoin/blob/master/.github/workflows/ci.yml
Do you have any idea why it is dropped?
Update
I forgot to put
ENV=testin ci