chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long requests wait in the queue using :queue_target and :queue_interval. See DBConnection.start_link/2 for more information
Where do I edit this queue_interval and queue_target ??? Please help.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Latest Phoenix Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #ai
- #graphql
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
dimitarvp
In
config/<env>.exs(where<env>isdev,test, orprod):Is what we had to do recently due to increased number of errors in production.
maltoe
Hi,
reviving this ancient topic as the error is the same, the solution would probably also work but doesn’t quite feel right. I’d rather try to understand why this is happening.
We’re also experiencing this error in a production environment. It happens rarely (maybe every 2-3 days), often comes in batches of 1-3, and does not cause any other exceptional output in our logs.
Now to the interesting bits:
:gen_server.try_dispatch/6is where GenServer sends the message to the callback module, I think. However,DBConnectiondoes notuse GenServerand itsrun/3is certainly not a GenServer callback. It seems like there are some frames missing in the stacktrace?!Does anyone have an idea how to debug this better?
[edit] Found this thread with the same error and Oban, but as said we have plenty of DB connections.
POOL_SIZEis large.sorentwo
The cron scheduler checks out a connection once a minute. Each running queue will checkout a database connection once per second (unless you’ve configured a different poll invertal). The number of attempted connections will scale linearly with the number of queues, so that increases the potential to have db connection issues.
maltoe
@sorentwo thanks, that is good to know. However, we only have 4 queues configured and a
POOL_SIZEof 15, I think. Plus, I would assume these queries to be extremely quick, especially when there are usually no jobs returned, right? No reason to keep other connection checkouts waiting in Ecto’s queue for ~3s.Also, sorry for saying that Oban would be the “culprit”. It’s the only “active” (in DB connection terms) component we have, hence could be related. But the 3s wait time in the queue makes me think the underlying issue is some hiccup in PG, Ecto, or DBConnection. It’s just too long to be caused by any “normal” operation we have.
Thanks for your insights.
sorentwo
With only four queues and a
POOL_SIZEof 15 you definitely shouldn’t encounter db checkout queueing. The queries take a couple of milliseconds at most, and when there aren’t any jobs they are sub-millisecond.Don’t sweat it! I’ve seen this issue for years now with and without Oban, so I believe there is something lower level happening that I haven’t figured out.
maltoe
Excellent. Since you’ve also experienced this issue and can’t tell about its root cause, I’m willing to just let it go and silence our exception tracker. Thanks again!
(still any hints by others are welcome of course
)
josefrichter
what do these parameters here mean, please?
dimitarvp
dimitarvp
Oh btw, also take a look at the types here, especially since we’re mentioning the date/time ones.
josefrichter
I am actually using
utc_datetime_usecin my app to capture when the user clicked the enrol button, and then sort records based on that - the idea is maybe it’s more fair than looking at database row number. plus it looks super cool when you have a list of people in class sorted by time with microsecond precisionEDIT> sneak peek