[CalendarServer-changes] [8134] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 29 13:59:27 PDT 2011


Revision: 8134
          http://trac.macosforge.org/projects/calendarserver/changeset/8134
Author:   glyph at apple.com
Date:     2011-09-29 13:59:25 -0700 (Thu, 29 Sep 2011)
Log Message:
-----------
add config key: MacDBConnectionsPerPool

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tap/caldav.py
    CalendarServer/trunk/twistedcaldav/stdconfig.py

Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py	2011-09-29 04:26:08 UTC (rev 8133)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py	2011-09-29 20:59:25 UTC (rev 8134)
@@ -661,7 +661,8 @@
             else:
                 raise UsageError("unknown DB type: %r" % (config.DBType,))
             pool = ConnectionPool(connectionFactory, dialect=dialect,
-                                  paramstyle=paramstyle)
+                                  paramstyle=paramstyle,
+                                  maxConnections=config.MaxDBConnectionsPerPool)
             txnFactory = pool.connection
         else:
             raise UsageError(
@@ -964,7 +965,8 @@
         def subServiceFactory(connectionFactory):
             ms = MultiService()
             cp = ConnectionPool(connectionFactory, dialect=dialect,
-                                paramstyle=paramstyle)
+                                paramstyle=paramstyle,
+                                maxConnections=config.MaxDBConnectionsPerPool)
             cp.setServiceParent(ms)
             store = storeFromConfig(config, cp.connection)
             mainService = createMainService(cp, store)

Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py	2011-09-29 04:26:08 UTC (rev 8133)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py	2011-09-29 20:59:25 UTC (rev 8134)
@@ -676,6 +676,16 @@
     "MaxRequests": 80,
     "MaxAccepts": 1,
 
+    "MaxDBConnectionsPerPool": 10, # The maximum number of outstanding database
+                                   # connections per database connection pool.
+                                   # When SharedConnectionPool (see above) is
+                                   # set to True, this is the total number of
+                                   # outgoing database connections allowed to
+                                   # the entire server; when
+                                   # SharedConnectionPool is False - this is the
+                                   # default - this is the number of database
+                                   # connections used per worker process.
+
     "ListenBacklog": 2024,
     "IdleConnectionTimeOut": 15,
     "UIDReservationTimeOut": 30 * 60,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110929/004c779f/attachment.html>


More information about the calendarserver-changes mailing list