CastLouis
i have a process that i want to modify the conection timeout in ecto, but it still wit the same conection time out this is the error:
[error] Postgrex.Protocol (pid<0.319.0>) disconnected: ** (DBConnection.ConnectionError) owner pid<0.481.0> timed out because it owned the connection for longer than 15000ms
(DBConnection.ConnectionError) tcp send: closed
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 18 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
romenigld
I have now a similiar DBConnection.ConnectionError with PostgreSQL but was after the computer fronzen the system and complains an error System on my Mac OS.
So I was reading here and what I do and now worked for me was Update the PostgreSQL.
So check for the Updates and try.
Eiji
@CastLouis: You have still a problem with 2nd code, but not I see better your problem (syntax highlighting is really helpful
Look at docs - it have more description. Hope you will better understand your error.
CastLouis
Excuse me
Loader:
Eiji
@CastLouis: you do not need to restart anything - just run tests by
mix testone more time after you change configuration - or in case you are changing for example ports then you need to be sure that 3rd party application is already runned on that port and if not reconfigure and restart it, but simple change anytimeoutvariable do not need to restart any 3rd party applications.Starting from my previous comment you answered that you modified only:
config/config.exs- please make sure that you read whole article. Last chapter is focusing on tests - there are more changes to do than modify only one file.And you still do not using special markup
Sometimes helpful practise is to create new project and start from 0, so:
It’s possible to make a typo like:
:timaoutwhich is not easy to noticeCastLouis
Jaja, no i am not just copy i try to understand this error, i follow your instructions and i add this line of code in my config/config.exs and it looks like this:
config :na_db, :ecto_repos, [NA.DB.Repo]
import_config “#{Mix.env}.exs”
and the problem still, now it throws this information:
test read my claim (NA.Claims.ClaimHistoryLoaderTest)
test/na_claims/claim_history_loader_test.exs:3
** (exit) exited in: GenServer.call(pid<0.489.0>, {:checkout, reference<0.0.2.28900>, true, 450000}, 5000)
** (EXIT) shutdown: “owner pid<0.483.0> timed out because it owned the connection for longer than 15000ms”
450000 and 5000 i don’t know where are those values, one question after doing the change i need to restart something?
Eiji
@CastLouis: ahh, I see what you have missed:
after that in the tutorial is on creating the tables. could you please help me, it all the information that i have it.
After that yes it’s about create example table and work on it, but after it there is chapter called: Tests and functionality! Please read whole article and not only copy and paste code.
Eiji
@CastLouis: so it’s a sub application in umbrella project. Make sure that other application does not override it’s configuration, for example:
File:
umbralla_app/apps/a:could be overwritten by
umbreall_app/apss/b:Please also update your post with proper markdown:
Please use this syntax:
```elixir
# your code goes here …
```
CastLouis
This are the modules that are in the tutorial, the database is create before
the mix.exs:
defmodule NA.DB.Mixfile do use Mix.Project
def project do [app: :na_db, version: “0.1.0”, build_path: “../../_build”, config_path: “../../config/config.exs”, deps_path: “../../deps”, lockfile: “../../mix.lock”, elixir: “~> 1.4”, build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, deps: deps()] end
def application do [ extra_applications: [:logger], mod: {NA.DB, } ] end
defp deps do [ {:postgrex, “~> 0.13”}, {:ecto, “~> 2.1”}, ] endend
the repo.ex:
defmodule NA.DB.Repo do use Ecto.Repo, otp_app: :na_dbend
the na_db.ex start function:
def start(_type, _args) do import Supervisor.Spec, warn: false
children = [ supervisor(NA.DB.Repo, [get_opts()]), ]
opts = [strategy: :one_for_one, name: NA.DB.Supervisor]
Supervisor.start_link(children, opts) end
The test.config:
config :na_db, NA.DB.Repo, adapter: Ecto.Adapters.Postgres, database: “nadb”, username: “dadmin”, password: “d@dm!n”, ownership_timeout: 60_000, hostname: “127.0.0.1”, pool: Ecto.Adapters.SQL.Sandbox, port: “5432”, timeout: 450000
The config/config.exs
import_config “#{Mix.env}.exs”
after that in the tutorial is on creating the tables. could you please help me, it all the information that i have it.
Eiji
@CastLouis: You missed something. Checked again Ecto tutorial step by step and be sure to add
:ownership_timeouttotest.exs. If you can publish your code or invite me to repository then I can fix it for you - I will create a PR. I have accounts on Github, BitBucket and GitLabCastLouis
i was modify postgrex @timeout property for chech, i was modifing the test.exs with ownership_timeout, pool_timeout and timeout too, but the problem persist and i dont know how can i find more information about it, i think the reset the machine if ecto see the changes let me.