在JBoss7中,我们使用以下方法限制了web连接的数量
<connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https" secure="true" max-connections="3000">对于urn:jboss:domain:web:1.0子系统,该子系统在通配符中被urn:jboss:domain:undertow:1.2替换。如何在野蝇中设置max-connections?
我查看了文档,没有找到匹配的属性。
谢谢
发布于 2015-04-23 16:31:11
尝试在筛选器定义下添加
<filters>
<connection-limit name="limit-connections" max-concurrent-requests="3000" queue-size="100"/>
</filters>然后在主机或位置下添加(取决于您的需要)
<filter-ref name="limit-connections"/>见配置示例和模型参考
还请查看配置Web:http://www.javacodegeeks.com/2014/01/entering-undertow-web-server.html的过程。
发布于 2017-10-12 12:44:48
费德里科·塞拉的上述评论是正确的。但是在Wildfli10.x中,过滤器名“连接限制”已经不存在了。相反,它现在被称为“请求-限制”。
因此,对于Wildfli10.x,在'server‘和'host’上下文中的untertow子系统中添加过滤器引用,在'filters‘上下文中添加请求限制过滤器:
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
[...]
<server name="default-server">
[...]
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
[...]
<filter-ref name="limit-connections"/>
</host>
</server>
[...]
<filters>
<response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
<request-limit name="limit-connections" max-concurrent-requests="3000" queue-size="100"/>
</filters>
</subsystem>发布于 2021-07-28 07:59:33
如果要限制HTTP/HTTPS/AJP连接器的最大并发连接数,则必须设置属性max-connections。示例:
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=max-connections,value=300)来源:如何在WildFly中设置最大网络连接数
https://stackoverflow.com/questions/29825894
复制相似问题