Commit 44a3a312 authored by Chris McDonough's avatar Chris McDonough

Support max-listen-sockets parameter in zope.conf (for ZServer CONNECTION_LIMIT).

parent c2a0f39a
...@@ -101,6 +101,10 @@ def http_realm(value): ...@@ -101,6 +101,10 @@ def http_realm(value):
def security_policy_implementation(value): def security_policy_implementation(value):
value not in ('C', None) and _setenv('ZOPE_SECURITY_POLICY', value) value not in ('C', None) and _setenv('ZOPE_SECURITY_POLICY', value)
def max_listen_sockets(value):
import ZServer
ZServer.CONNECTION_LIMIT = value
# server handlers # server handlers
def root_handler(config): def root_handler(config):
......
...@@ -557,4 +557,15 @@ ...@@ -557,4 +557,15 @@
<section type="zoperunner" name="*" attribute="runner"/> <section type="zoperunner" name="*" attribute="runner"/>
<!-- the below should go into the ZServer package, but I can't quite
figure out how to put it there -->
<key name="max-listen-sockets" datatype="integer"
handler="max_listen_sockets" default="1000">
<description>
The maximum number of sockets that ZServer will attempt to open
in order to service incoming connections.
</description>
</key>
</schema> </schema>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment