Community mailing list archives
Re: postgresql idle threads from odooby
Yes, Odoo does pooling, the problem is when all current connections are being used, Odoo just creates a new one (or gives an error if you have hit the limit). That would be fine if it closed them later, but it never does, so if you hit a peak, Odoo might open a lot of connections and just leaves them around until you restart the server.PgBouncer, on the other hand, is smarter: it keeps only a few connections permanently open. If there's a need for more, it opens them, but when the traffic dies down it progressively closes these additional connections. It can also keep transactions waiting a bit for a free connection, and only open new ones after the transaction has waited too much.2015-09-10 10:16 GMT+01:00 Caudal Eric <firstname.lastname@example.org>:I was told not to use pg_bouncer as odoo already pools the request (x64 AFAIK)On Thu, Sep 10, 2015 at 4:34 PM André P. <email@example.com> wrote:That has been our experience as well - Odoo opens up new connections when it gets many requests at once, but then never frees them up.Our solution was to put PgBouncer (with Transaction Pooling) between Odoo and Postgres; that said, this solution disables support for some of Postgres features, so it might not work for you if you're doing something more advanced.2015-09-10 8:35 GMT+01:00 Qingdao Odoo Tech <firstname.lastname@example.org>:
Not sure if this is the right place to raise this question. Please correct me if I am wrong.
We are facing problems with Odoo server today which popped up 404 Not Found errors. Users were then diverted to another hosting server. After the original hosting server was rebooted, too many idle threads were discovered which were not noticed before. Here is a snapshot of memory usage.
I wonder if anybody has such experience, and your comments are highly appreciated.
Qingdao Odoo Team
Eric Caudal (from my mobile)