Because of many configuration settings on ecto like timeout, pool_size, queue_target, queue_interval and etc, I want to disable it. Instead of ecto pool I want to use only pgbouncer.
Ecto pool settings is like magic to right now, because when I have set timeout was 15 seconds I got many pool timeout errors. And I when I set to 120 seconds I also got many pool timeout errors sometimes (20-500 errors in one minute and then worked correctly).
Only after changing to 65 seconds application started to works without any pool timeout errors.
Everything is ok right now, but I am afraid that the problem can be returned.
My ecto database configuration:
hostname: “10.128.0.3”,
pool_size: 200,
queue_target: 5_000,
queue_interval: 20_000,
prepare: :unnamed,
timeout: 65_000
Error:
(DBConnection.ConnectionError) tcp recv: closed (the connection was closed by the pool, possibly due to a timeout or because the pool has been terminated)