Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5382 Представления

We know odoo can use the dbfilter - in the config file - for it to choose the right database when a new request comes in.

But does it keep the database connection open after the request is fulfilled (in its registry object)?

Let's say I have a system with 50 databases and dbfilter=^%d$. Here odoo will use the subdomain as the database filter and process the request. But I would like to know if it will keep the database connection open as a registry object so that every other request the comes from the same subdomain later on, doesn't have to open the connection, again.

Asking this because what if in my multi tenant architecture, certain DB's are used much less frequently than the others. Will keeping the database connection open be an expense?


This question was asked on stackoverflow and on github


https://stackoverflow.com/questions/64169770/does-odoo-keep-a-database-connection-open-in-a-multitenant-system

https://github.com/odoo/odoo/issues/59046

Аватар
Отменить
Лучший ответ

Yes, it uses connection pool which is limited by db_maxconn parameter. Limit is applied per python process.

See https://github.com/odoo/odoo/blob/14.0/odoo/sql_db.py#L543

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
авг. 25
1865
0
окт. 24
1437
1
авг. 22
2676
0
авг. 22
2185
0
окт. 21
2137