Do not copy connection pool after fork
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.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Cédric Krier added trytond type::crash + 1 deleted label
added trytond type::crash + 1 deleted label
New review285251002 at https://codereview.tryton.org/285251002/#ps287371002
- Review Robot added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Author Owner
Here is review285251002 which store connection pool per pid.
- Cédric Krier assigned to @ced
assigned to @ced
- Cédric Krier added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
New changeset f9982286317a by Cédric Krier in branch 'default':
Store database pool per process
https://hg.tryton.org/trytond/rev/f9982286317a- Roundup Robot added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Roundup Robot closed
closed
New changeset dc4e5d3698fe by Cédric Krier in branch 'default':
Store database pool per process
https://hg.tryton.org/tryton-env/rev/dc4e5d3698fe- Author Owner
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? - Cédric Krier added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Cédric Krier reopened
reopened
- Developer
I see no problem changing the internal API of the postgresql database object for the backports.
- Cédric Krier added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Cédric Krier closed
closed
New changeset c71e15f0bb00 by Cédric Krier in branch '5.2':
Store database pool per process
https://hg.tryton.org/trytond/rev/c71e15f0bb00
New changeset 2f655e99d5cb by Cédric Krier in branch '5.0':
Store database pool per process
https://hg.tryton.org/trytond/rev/2f655e99d5cb- Cédric Krier mentioned in issue #9832 (closed)
mentioned in issue #9832 (closed)