exception exit: timeout in gen_server:call

Roger Lipscombe roger@REDACTED
Wed Dec 4 09:33:21 CET 2019


On Tue, 3 Dec 2019 at 19:32, Jesper Louis Andersen
<jesper.louis.andersen@REDACTED> wrote:
> * Measure the maximal latency over the equery call you've made for a 10-15 second period. Plot it.

We wrap our database calls (and pool checkouts) in
folsom_metrics:histogram_timed_update, which reports percentiles to
graphite. Since folsom is (afaict) abandoned, you could see if (e.g.)
exometer has something similar. We also report connections-in-use,
etc., which is helpful.

> * Pipeline the queries. A query which waits for an answer affects every sibling query as well.

Other pooling models are available. Pull, rather than push, might help
-- because it could pull N pending requests and pipeline them. Can't
find the relevant links right now, though.


>
> Down the line:
>
> * Postgres can log slow queries. Turn that on.
> * Postgres can log whenever it holds a lock for more than a certain time window. Turn that on.
>
> Narrow down where the problem can occur by having systems provide facts to you. Don't go for "what is wrong?" Go for "What would I like to know?". This helps observability (In the Control Theory / Charity Majors sense).
>



More information about the erlang-questions mailing list