summaryrefslogtreecommitdiff
path: root/server/src/leap/soledad
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-10-14 11:50:48 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-10-14 11:50:48 -0300
commit1b07d2b54208d6b19135e771162f7e39e02c1f97 (patch)
tree23a800124979f34be480b5b9708b625136a664d7 /server/src/leap/soledad
parentd20f232517035219faa597943a3bbc2c3d483160 (diff)
[bug] reduce overall sync session caching to 120s
It was 3600s, but closing connections seems to yet depend on garbage collection and now causes server to leak file handlers. 120s should be enough to a sync session finish. Also, lowering this value will only make very long syncs use more of couch every 2 minutes, while raising this value will keep memory busy for useless time.
Diffstat (limited to 'server/src/leap/soledad')
-rw-r--r--server/src/leap/soledad/server/sync.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/sync.py b/server/src/leap/soledad/server/sync.py
index 619be565..b3fb2b84 100644
--- a/server/src/leap/soledad/server/sync.py
+++ b/server/src/leap/soledad/server/sync.py
@@ -185,7 +185,7 @@ class SyncResource(http_app.SyncResource):
:type ensure: bool
"""
# create or open the database
- cache = get_cache_for('db-' + sync_id + self.dbname)
+ cache = get_cache_for('db-' + sync_id + self.dbname, expire=120)
if ensure:
db, self.replica_uid = self.state.ensure_database(self.dbname)
elif cache and 'instance' in cache: