PostgreSQL Idle connections and docker
I am currently hosting a dozen of Odoo databases on one server. I use docker, with one container containing postgresql and five with odoo services. There is not many visitors yet. I use a recent pull of Odoo 8 from github and 9.4 version of postgres (it was the same with 9.1)
My problem is, after a dozen of hours I have almost an hundred of idle process in the postgres container, all related with the Odoo databases. It seems the connections to postgres never close.
I checked SELECT * FROM pg_stat_activity;, it seems the idle query is always COMMIT or ROLLBACK. Do you have any idea where the problem comes and how I can improve the situation? Do you think it's related on the use of docker?