Issue #1732 Connection Limit (#1745)

Configure accepting during low resources from module/ini
This commit is contained in:
Greg Wilkins 2017-09-05 17:27:36 +10:00
parent dd20272c48
commit 7be350370c
3 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,7 @@
<Set name="maxConnections"><Property name="jetty.lowresources.maxConnections" deprecated="lowresources.maxConnections" default="0"/></Set>
<Set name="maxMemory"><Property name="jetty.lowresources.maxMemory" deprecated="lowresources.maxMemory" default="0"/></Set>
<Set name="maxLowResourcesTime"><Property name="jetty.lowresources.maxLowResourcesTime" deprecated="lowresources.maxLowResourcesTime" default="5000"/></Set>
<Set name="acceptingInLowResources"><Property name="jetty.lowresources.accepting" default="true"/></Set>
</New>
</Arg>
</Call>

View File

@ -27,3 +27,6 @@ etc/jetty-lowresources.xml
## Max time a resource may stay in low resource mode before actions are taken (in milliseconds)
# jetty.lowresources.maxLowResourcesTime=5000
## Accept new connections while in low resources
# jetty.lowresources.accepting=true

View File

@ -84,7 +84,7 @@ public class LowResourceMonitor extends AbstractLifeCycle
private String _cause;
private String _reasons;
private long _lowStarted;
private boolean _acceptingInLowResources;
private boolean _acceptingInLowResources = true;
private final Runnable _monitor = new Runnable()
{