summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-02 13:52:16 +0000
committerErik Johnston <erik@matrix.org>2015-03-02 13:52:16 +0000
commit3fce185c778df250d6357636048b8486281d10c8 (patch)
treee2c89a66c3285b872225fdcb57a26e2fbd46f4c8 /synapse/config
parentMerge pull request #94 from matrix-org/federation_rate_limit (diff)
parentBy default set soft limit to hard limit (diff)
downloadsynapse-3fce185c778df250d6357636048b8486281d10c8.tar.xz
Merge pull request #83 from matrix-org/nofile_limit_config
Add config option to set the soft fd limit on start
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/server.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 31e44cc857..4e4892d40b 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -31,6 +31,7 @@ class ServerConfig(Config):
         self.webclient = True
         self.manhole = args.manhole
         self.no_tls = args.no_tls
+        self.soft_file_limit = args.soft_file_limit
 
         if not args.content_addr:
             host = args.server_name
@@ -77,6 +78,12 @@ class ServerConfig(Config):
                                   "content repository")
         server_group.add_argument("--no-tls", action='store_true',
                                   help="Don't bind to the https port.")
+        server_group.add_argument("--soft-file-limit", type=int, default=0,
+                                  help="Set the soft limit on the number of "
+                                       "file descriptors synapse can use. "
+                                       "Zero is used to indicate synapse "
+                                       "should set the soft limit to the hard"
+                                       "limit.")
 
     def read_signing_key(self, signing_key_path):
         signing_keys = self.read_file(signing_key_path, "signing_key")