Setting up maximum of connections for web

岁酱吖の 提交于 2019-11-30 02:44:48

Try add under filters definition

<filters>
    <connection-limit name="limit-connections" max-concurrent-requests="3000" queue-size="100"/>
</filters>

and then under host or location add (depends on your need)

<filter-ref name="limit-connections"/>

See a configuration example and Model Reference

Also take a look in Configuring the Web server Pool: http://www.javacodegeeks.com/2014/01/entering-undertow-web-server.html

The above comment from Federico Sierra is correct. But in Wildfly 10.x the filter name 'connection-limit' doesn't exist anymore. Instead it is now called 'request-limit'.

So for Wildfly 10.x add filter reference in the untertow subsystem inside 'server' and 'host' context and the request-limit filter inside the 'filters' context:

<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>

Reference: https://github.com/wildfly/wildfly/blob/master/undertow/src/test/resources/org/wildfly/extension/undertow/undertow-3.1.xml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!