wfgilman
Intermittent DB Timeout Errors from Postgrex on AWS RDS
My logs are showing intermittent timeout errors for queries that are normally really quick (milliseconds). They are just SELECT queries for ~10 records.
DBConnection.Connection: 20:52:25.688 [error] Postgrex.Protocol (#PID<0.2258.0>)
disconnected: ** (DBConnection.ConnectionError) client #PID<0.2502.0> timed out because
it checked out the connection for longer than 15000ms
Has anyone experienced this? Some thoughts that come to mind:
- Connectivity of RDS
- Records are being locked by another process
Would appreciate any commentary here. I’m not sure how to go about debugging this. I read all the threads about passing extended timeouts to the DB, but that doesn’t seem necessary since I don’t have any ecto queries that run over 1s.
Marked As Solved
wfgilman
To close the loop on this, I’m almost 100% certain that the timeout errors were due to the DB connection pool being maxed out due to multiple instances of my application being started by my autoscaling parameters.
Also Liked
OvermindDL1
Heh, I mean on the PostgreSQL Server itself, I’m pretty sure this will be standard SQL server debugging rather than anything Elixir specific (though it’s possible, I find it highly unlikely). ![]()
byungjikroh
I have same problem. Not slow query takes too much time more than timeout setting.
I haven’t solved this problem and not found out a hint to solve.
Popular in Questions
Other popular topics
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
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








