summary refs log tree commit diff
path: root/synapse/app/pusher.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-07 15:45:56 +0100
committerErik Johnston <erik@matrix.org>2016-06-07 15:45:56 +0100
commitdded389ac16ec023c986df400d25ca94a4a28677 (patch)
tree3849482e45e1530169b80c91082f7b5bf5e07bb4 /synapse/app/pusher.py
parentMerge pull request #847 from matrix-org/erikj/gc_tick (diff)
downloadsynapse-dded389ac16ec023c986df400d25ca94a4a28677.tar.xz
Allow setting of gc.set_thresholds
Diffstat (limited to 'synapse/app/pusher.py')
-rw-r--r--synapse/app/pusher.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py
index 3c3fa38053..7e2bf7ecc2 100644
--- a/synapse/app/pusher.py
+++ b/synapse/app/pusher.py
@@ -43,6 +43,7 @@ from twisted.web.resource import Resource
 
 from daemonize import Daemonize
 
+import gc
 import sys
 import logging
 
@@ -342,6 +343,8 @@ def setup(config_options):
     ps.start_listening()
 
     change_resource_limit(ps.config.soft_file_limit)
+    if ps.config.gc_thresholds:
+        gc.set_threshold(*ps.config.gc_thresholds)
 
     def start():
         ps.replicate()
@@ -361,6 +364,8 @@ if __name__ == '__main__':
             def run():
                 with LoggingContext("run"):
                     change_resource_limit(ps.config.soft_file_limit)
+                    if ps.config.gc_thresholds:
+                        gc.set_threshold(*ps.config.gc_thresholds)
                     reactor.run()
 
             daemon = Daemonize(