wfgilman

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:

  1. Connectivity of RDS
  2. 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

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

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). :slight_smile:

byungjikroh

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.

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

Other popular topics Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement