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
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
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
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
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
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
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
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
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
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (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