Handling Postgres timeouts

Hi there,

In my production environment (Heroku + Postgres), I’m facing Postgres timeout issues.
My client (Ecto) never receives postgres reply and times out after 1 hour (matching :timeout setting in prod.exs)

But if I look at Postgres logs, I can see that Postgres actually tried to send the result to the client after 2 minutes, but client was disconnected : sql_error_code = XX000 LOG: could not send data to client: Connection timed out

How should I handle these issues?

2 Likes