bobics

bobics

Ecto poolboy checkout timeouts

I’m seeing an issue where all the poolboy database workers in our pool are being used after some request load (not a lot) on our server. :poolboy.status/1 shows the state as full. Even when the request load drops, all the poolboy workers are still busy. Error log:

GenServer #PID<0.21289.1135> terminating ** (stop) exited in: :gen_server.call(App.Repo.Pool, {:checkout, #Reference<0.2565884396.2513436674.60058>, true}, 5000) ** (EXIT) time out

In our postgres logs we immediately start seeing, and very few queries going through:


unexpected EOF on client connection with an open transaction

The issue seems similar to https://github.com/elixir-ecto/db_connection/issues/127 except we’re on OTP 21.0.5 where that bug is already fixed.

We don’t have a specific repro case, except that it seems to occur under some request load. The DB isn’t under any significant load. This typically occurs anywhere from 30 minutes to a few hours, and the request load doesn’t vary significantly during that period as far as I can tell. What’s odd is that the application goes from sub 50ms mean response time to unresponsive almost immediately when the issue occurs, and then never recovers until we restart.

Using Ecto 2.2.10, db_connection 1.1.3

Hoping someone here can provide some leads, thanks!

Marked As Solved

bobics

bobics

Did a bunch of debugging today, I think the underlying issue is due to some long running transactions (which don’t get logged properly so we weren’t seeing them in our postgres logs). I’ll update this thread when I confirm.

Where Next?

Popular in Questions Top

Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
Kagamiiiii
Student &amp; New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
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
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
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
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
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
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

We're in Beta

About us Mission Statement