Community mailing list archives

community@mail.odoo.com

Re: postgresql idle threads from odoo

by
Projetgrup, Levent Karakaş
- 09/10/2015 09:22:17
We are auto restarting all server instances after midnight. Although it doesn't solve the problem of unnecessary ports opened during the day, it gives a fresh start every morning... Here's the db connections histogram of last 3 days in one of our servers.

Satır içi resim 1

2015-09-10 14:49 GMT+03:00 André P. <app@thinkopen.solutions>:
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 <caudaleric@gmail.com>:
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. <app@thinkopen.solutions> 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 <jason@qdodoo.com>:

Hi all,

 

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.

 

Thanks.

 

Jason Cui

Qingdao Odoo Team

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
 André Paramés 
ODOO CONSULTANT
m  +351 939 158 257
e    app@thinkopen.solutions
 
 LISBOA | Avenida das Túlipas, nº 6, 13º A/B  1495-161 Algés

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

--

Eric  Caudal (from my mobile)

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
 André Paramés 
ODOO CONSULTANT
m  +351 939 158 257
e    app@thinkopen.solutions
 
 LISBOA | Avenida das Túlipas, nº 6, 13º A/B  1495-161 Algés

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe