'Setting max-parameters on Listeners for Domain Server (Wildfly 9)

I'm having some trouble with an application exhausting the default 1000 parameters listeners have, particularly https listeners. Unfortunately, the server that the application is setup on is running Wildfly 9 in domain mode, and most of the advice I've found for changing the max parameters on a Wildfly server refer to servers running in standalone mode.

I've got the following listeners setup in my domain.xml, but am still getting a "UT000047: The number of parameters exceeded the maximum of 1000" exception:

<subsystem xmlns="urn:jboss:domain:undertow:2.0">
    <buffer-cache name="default"/>
    <server name="default-server">
        <ajp-listener name="ajp" socket-binding="ajp" max-parameters="5000"/>
        <http-listener name="default" socket-binding="http" redirect-socket="https" max-parameters="5000"/>
        <host name="default-host" alias="localhost">
            <location name="/" handler="welcome-content"/>
            <filter-ref name="server-header"/>
            <filter-ref name="x-powered-by-header"/>
        </host>
    </server>
    <servlet-container name="default">
        <jsp-config/>
        <websockets/>
    </servlet-container>
    <handlers>
        <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
    </handlers>
    <filters>
        <response-header name="server-header" header-name="Server" header-value="WildFly/9"/>
        <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
    </filters>
</subsystem>
<subsystem xmlns="urn:jboss:domain:undertow:2.0">
    <buffer-cache name="default"/>
    <server name="default-server">
        <http-listener name="default" socket-binding="http" redirect-socket="https" max-parameters="5000"/>
        <https-listener name="https" socket-binding="https" security-realm="UndertowRealm" enabled-protocols="TLSv1.2"  max-parameters="5000"/>
        <host name="default-host" alias="localhost">
            <location name="/" handler="welcome-content"/>
            <filter-ref name="server-header"/>
            <filter-ref name="x-powered-by-header"/>
            <filter-ref name="modcluster"/>
        </host>
    </server>
    <servlet-container name="default">
        <jsp-config/>
        <websockets/>
    </servlet-container>
    <handlers>
        <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
    </handlers>
    <filters>
        <response-header name="server-header" header-name="Server" header-value="My Server"/>
        <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="MyHeader"/>
        <mod-cluster name="modcluster" management-socket-binding="http" advertise-socket-binding="modcluster"/>
    </filters>
</subsystem>
<subsystem xmlns="urn:jboss:domain:undertow:2.0">
    <buffer-cache name="default"/>
    <server name="default-server">
        <ajp-listener name="ajp" socket-binding="ajp" max-parameters="5000"/>
        <http-listener name="default" socket-binding="http" redirect-socket="https" max-parameters="5000"/>
        <host name="default-host" alias="my.host.local">
            <location name="/" handler="welcome-content"/>
            <filter-ref name="server-header"/>
            <filter-ref name="x-powered-by-header"/>
        </host>
    </server>
    <servlet-container name="default">
        <jsp-config/>
        <websockets/>
    </servlet-container>
    <handlers>
        <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
    </handlers>
    <filters>
        <response-header name="server-header" header-name="Server" header-value="WildFly/9"/>
        <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
    </filters>
</subsystem>

I've set the max-parameters argument on all the undertow listeners I could find out of desperation, but this is not working, so how should the max parameters actually be set in this sitation?



Solution 1:[1]

You first need to determine the profile your server is running on. You can do this in CLI with something like:

/server-group=main-server-group:read-attribute(name=profile)

Once you have the profile, full in the default case, you can edit the attribute with the following CLI command:

/profile=full/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=max-parameters, value=5000)

Essentially it would be the same as what you find for standalone, but you prefix the path with /profile=your_profile.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 James R. Perkins