Tryton - Issues

 

Issue8281

Title Do not copy connection pool after fork
Priority bug Status chatting
Superseder Nosy List ced, edbo, roundup-bot, udono
Type crash Components trytond
Assigned To ced Keywords backport
Reviews 285251002
View: 285251002

Created on 2019-04-15.20:13:17 by ced, last changed by edbo.

Messages
msg53073 (view) Author: [hidden] (edbo) Date: 2019-11-07.10:56:28
I also prefer a backport of the changes.
msg53072 (view) Author: [hidden] (udono) (Tryton translator) Date: 2019-11-06.21:56:57
I see no problem changing the internal API of the postgresql database object for the backports.
msg52830 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-31.15:32:03
I just fail into the same issue with the official Docker image (using DATABASES env).
I think we should backport the fix even if it changes the internal API of postgresql Database object (_databases dict -> defaultdict(dict)).
Another option is to set lazy-apps on the uwsgi configuration of Docker images but this reduces the performance.
What do you think?
New changeset dc4e5d3698fe by Cédric Krier in branch 'default':
Store database pool per process
https://hg.tryton.org/tryton-env/rev/dc4e5d3698fe
New changeset f9982286317a by Cédric Krier in branch 'default':
Store database pool per process
https://hg.tryton.org/trytond/rev/f9982286317a
msg49964 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-06-04.11:49:52
Here is review285251002 which store connection pool per pid.
New review285251002 at https://codereview.tryton.org/285251002/#ps287371002
msg49056 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-15.20:13:17
From https://discuss.tryton.org/t/connection-closed-every-couple-of-minutes/1309
When wsgi server uses fork the connection pool should be dropped because they can not be shared between processes.
History
Date User Action Args
2019-11-07 10:56:28edbosetnosy: + edbo
messages: + msg53073
2019-11-06 21:56:58udonosetnosy: + udono
messages: + msg53072
2019-10-31 15:32:04cedsetstatus: resolved -> chatting
messages: + msg52830
keyword: + backport
2019-06-27 21:45:58roundup-botsetmessages: + msg50439
2019-06-27 21:45:51roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg50438
2019-06-04 11:49:53cedsetstatus: chatting -> testing
assignedto: ced
messages: + msg49964
keyword: - review
nosy: - reviewbot
2019-06-04 11:47:00reviewbotsetstatus: unread -> chatting
nosy: + reviewbot
messages: + msg49963
2019-06-04 11:46:59reviewbotsetreviews: 285251002
keyword: + review
2019-04-15 20:13:17cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)