diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-07 15:45:56 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-07 15:45:56 +0100 |
commit | dded389ac16ec023c986df400d25ca94a4a28677 (patch) | |
tree | 3849482e45e1530169b80c91082f7b5bf5e07bb4 /synapse/app/homeserver.py | |
parent | Merge pull request #847 from matrix-org/erikj/gc_tick (diff) | |
download | synapse-dded389ac16ec023c986df400d25ca94a4a28677.tar.xz |
Allow setting of gc.set_thresholds
Diffstat (limited to 'synapse/app/homeserver.py')
-rwxr-xr-x | synapse/app/homeserver.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index df675c0ed4..22e1721fc4 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -16,6 +16,7 @@ import synapse +import gc import logging import os import sys @@ -351,6 +352,8 @@ class SynapseService(service.Service): def startService(self): hs = setup(self.config) change_resource_limit(hs.config.soft_file_limit) + if hs.config.gc_thresholds: + gc.set_threshold(*hs.config.gc_thresholds) def stopService(self): return self._port.stopListening() @@ -422,6 +425,8 @@ def run(hs): # sys.settrace(logcontext_tracer) with LoggingContext("run"): change_resource_limit(hs.config.soft_file_limit) + if hs.config.gc_thresholds: + gc.set_threshold(*hs.config.gc_thresholds) reactor.run() if hs.config.daemonize: |