mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-18 13:04:36 -04:00
Allow setting of gc.set_thresholds
This commit is contained in:
parent
188f8d63e2
commit
dded389ac1
4 changed files with 38 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue