Permalink
Browse files

Make cassandra connection pool size configurable.

  • Loading branch information...
1 parent 8b386b9 commit fcd3f3bba3284f7f92d6ac5440496e62062785df @spladug spladug committed Feb 2, 2012
Showing with 4 additions and 1 deletion.
  1. +2 −0 r2/example.ini
  2. +2 −1 r2/r2/lib/app_globals.py
View
@@ -117,6 +117,8 @@ rendercaches = 127.0.0.1:11211
permacache_memcaches = 127.0.0.1:11211
# cassandra hosts. one of these will be chosen at random by pycassa
cassandra_seeds = 127.0.0.1:9160
+# number of connections to keep open to the cassandra ring
+cassandra_pool_size = 5
# read/write consistency levels for Cassandra
cassandra_rcl = ONE
cassandra_wcl = ONE
View
@@ -69,6 +69,7 @@ class Globals(object):
'comment_visits_period',
'min_membership_create_community',
'bcrypt_work_factor',
+ 'cassandra_pool_size',
]
float_props = ['min_promote_bid',
@@ -236,7 +237,7 @@ def setup(self, global_conf):
stats=self.stats,
logging_name="main",
server_list=self.cassandra_seeds,
- pool_size=len(self.cassandra_seeds),
+ pool_size=self.cassandra_pool_size,
timeout=2,
max_retries=3,
prefill=False

0 comments on commit fcd3f3b

Please sign in to comment.