[PATCH 08 of 23 cubicweb V2] [database] increase maximum number of connections to 5

Laurent Peuch cortex at worlddomination.be
Fri Jan 17 14:37:05 CET 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1576831428 -3600
#      Fri Dec 20 09:43:48 2019 +0100
# Node ID 7c7ecabf54c7ef5ba4c19f4e54cdff2cf1a99061
# Parent  0e4e519f2bf08caf3fb07430ba5914d18a9efde3
# Available At https://hg.logilab.org/users/lpeuch/cubicweb
#              hg pull https://hg.logilab.org/users/lpeuch/cubicweb -r 7c7ecabf54c7
[database] increase maximum number of connections to 5

Local benchmark has shown that at least, on a default index, increasing this
number to 5 makes vanish the situation where you totally saturate the
connections pool and thus ended up with big latency until the pool raise an
exception.

diff --git a/cubicweb/server/serverconfig.py b/cubicweb/server/serverconfig.py
--- a/cubicweb/server/serverconfig.py
+++ b/cubicweb/server/serverconfig.py
@@ -134,7 +134,7 @@ the repository rather than the user runn
           }),
         ('connections-pool-size',
          {'type' : 'int',
-          'default': 4,
+          'default': 5,
           'help': 'size of the connections pool. Each source supporting multiple \
 connections will have this number of opened connections.',
           'group': 'main', 'level': 3,
diff --git a/cubicweb/test/unittest_cwconfig.py b/cubicweb/test/unittest_cwconfig.py
--- a/cubicweb/test/unittest_cwconfig.py
+++ b/cubicweb/test/unittest_cwconfig.py
@@ -196,7 +196,7 @@ class CubicWebConfigurationTC(BaseTestCa
             del os.environ['CW_BASE_URL']
 
     def test_config_value_from_environment_int(self):
-        self.assertEqual(self.config['connections-pool-size'], 4)
+        self.assertEqual(self.config['connections-pool-size'], 5)
         os.environ['CW_CONNECTIONS_POOL_SIZE'] = '6'
         try:
             self.assertEqual(self.config['connections-pool-size'], 6)



More information about the cubicweb-devel mailing list