Ecto can not reach db server

Hello,
I see weird problem on app which is running on Ubuntu with systemd. That app is mostly about Oban jobs, which are loaded from remote DB. When there is more load for Elixir app with that Oban Jobs looks like connection to DB is crashed. Restarting app doesn’t help and when I connect to that remote DB from same host just with psql, not ecto it works.

[info] Postgrex.Protocol (#PID<0.1625.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.10886.0> exited

Ecto has this config:

    queue_target: 5_000,
    queue_interval: 500,
    backoff_min: 2_500,
    max_seconds: 15,
    timeout: 15_000,
    connect_timeout: 10_000

Any suggestion what can happen? Or how to debug it deeper to find solution?

1 Like