Connections not being closed(HikariCP, Postgres)
Solved by setting maxLifetime
to 10 minutes.
Explanation:It turns out docker swarm somehow drops idle connection. So, when hikari closes connection, nothing reaches postgres, so from postgres standpoint there is still a connection. 10 minutes is less that default docker idle connection timeout, so connections are closed properly.