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
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’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
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
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
Hi all,
I’m trying to get Pi working well as an external agent inside Tidewave.ai via ACP.
Tidewave’s settings make it possible to add ...
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
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
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
@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
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn:
This is possible because it now builds on a very stab...
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
- #podcasts-by-brainlid
- #blog-post
- #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 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Eiji
@CastLouis: Did you checked this article? It’s guide for probably what you want.
CastLouis
i check my configurations and looks like in the example, the problem is that when i run the process it took more time than 15ms, and i modify the conection timeout in test.exs and in all the files and it doesn’t work.
Eiji
@CastLouis: It looks like another problem with (default?) configuration - ping @josevalim and @fishcakez.
To be sure, please update your dependencies (especially
EctoandPostgrex).Please also give us some info:
Distro Name - Version - default/name of repoErlangandElixirversionsEctoandPostgrex)timeoutjosevalim
Thanks @Eiji.
Keep in mind that the ownership timeout is controlled by the
:ownership_timeoutconfiguration. I think we improve the error message for it in more recent versions as well.CastLouis
Good morning
i was loading a .csv file with a lot of registry, it took a lot of time to complete, while it loading the
code of loading the file
defp parse_line_to_string(line) do
<<code::binary-size(2), _::binary-size(1), rest::binary>> = line
{code, rest}
end
the code to insert into the database:
defp parse_line_to_string(line) do
<<code::binary-size(2), _::binary-size(1), rest::binary>> = line
{code, rest}
end
#the configuration from ecto:
config :na_db,
ecto_repos: [NA.DB.Repo]
config :na_db, NA.DB.Repo,
adapter: Ecto.Adapters.Postgres,
database: “nadb”,
username: “dadmin”,
password: “d@dm!n”,
hostname: “127.0.0.1”,
pool: Ecto.Adapters.SQL.Sandbox,
port: “5432”,
timeout: 450000
i was changing and use :ownership_timeout and set more time and it doesn’t work.
Eiji
I tried to simulate similar work (collecting data for more than 15s) and I got same error, however
SupervisorforMyApp.Reposaves tests from not passing and I checked also database and all works! Elixir is just awesome!@josevalim: Thanks! I added it to configuration and it still works same, but without errors like in this topic. I agree that we need a better error message, because I also through about other
timeoutconfiguration variables.I have a question that is related to this topic. Is it
safeto set much more biggertimeoutsin configuration than default one or we need to accept some consequences? Imagine new blog will probably be rarely visited and that surprise of Elixir admin that it have a error every 15s@CastLouis: Make sure that you are changing it in right configuration file and be sure to follow all steps in tutorial I previously linked. As I already wrote I got same error in example application and solved it using both tutorial and José tip.
CastLouis
i was modifing the postgrex.ex, the property @timeout with more time, but the problem still,
Eiji
@CastLouis: What you mean by
postgrex.ex? You need to change configuration*.exsfile in/configdirectory. Depends on environment that you are working on you should apply configuration change in appropriate configuration file like:test.exs.Example
config/test.exsfile:CastLouis
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.
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 GitLab