Mon, 30 Mar 2020 15:45:40 +0200 [server] implement dynamic database pooler draft
Philippe Pepiot <ph@itsalwaysdns.eu> [Mon, 30 Mar 2020 15:45:40 +0200] rev 12962
[server] implement dynamic database pooler Opening too much database connection has a cost at startup and also PostgreSQL as a maximum number of connection (100 by default). This get worse when starting multiple wsgi processes, since each process has its own database pool. Instead of opening `connections-pool-size` connections to the database at startup, just open one and open more only when needed.
Mon, 30 Mar 2020 15:30:02 +0200 [server] use a LifoQueue in _CnxSetPool draft
Philippe Pepiot <ph@itsalwaysdns.eu> [Mon, 30 Mar 2020 15:30:02 +0200] rev 12961
[server] use a LifoQueue in _CnxSetPool In postgresql, some cache is attached to the connection. Using a LifoQueue (last-in, first-out) makes a few connections to get the most load which give best performance.
Mon, 30 Mar 2020 15:23:56 +0200 [server] extract creating a new cnxset in a _new_cnxset() helper draft
Philippe Pepiot <ph@itsalwaysdns.eu> [Mon, 30 Mar 2020 15:23:56 +0200] rev 12960
[server] extract creating a new cnxset in a _new_cnxset() helper So we can move logic specific to _CnxSetPool here.
Mon, 30 Mar 2020 15:19:23 +0200 [server] avoid a possible race condition on _CnxSetPool.close() draft
Philippe Pepiot <ph@itsalwaysdns.eu> [Mon, 30 Mar 2020 15:19:23 +0200] rev 12959
[server] avoid a possible race condition on _CnxSetPool.close() The pool could become empty between time to check and time to use.
(0) -10000 -3000 -1000 -300 -100 -4 +4 tip