Stacktrace:
01:00:15.016 [error] Postgrex.Protocol (#PID<0.2310.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.26161.221> timed out because it queued and checked out the connection for longer than 15000ms
#PID<0.26161.221> was at location:
:prim_inet.recv0/3
(postgrex) lib/postgrex/protocol.ex:2837: Postgrex.Protocol.msg_recv/4
(postgrex) lib/postgrex/protocol.ex:1879: Postgrex.Protocol.recv_bind/3
(postgrex) lib/postgrex/protocol.ex:1771: Postgrex.Protocol.bind_execute/4
(db_connection) lib/db_connection/holder.ex:316: DBConnection.Holder.holder_apply/4
(db_connection) lib/db_connection.ex:1255: DBConnection.run_execute/5
(db_connection) lib/db_connection.ex:1342: DBConnection.run/6
(db_connection) lib/db_connection.ex:539: DBConnection.parsed_prepare_execute/5
I have been getting this error in production the most contribution of my prod 5XX.
I tried search around and found multiple solutions but not sure which one to apply and don’t want to break the system trying incorrect solution.
Here is the two solution I found
timeout: 60_000,
pool_timeout: 60_000
And
ownership_timeout: 60_000
Can you please help me by explaining this and which one to use and where.
Thanks a lot.