Configuring max-post-size in WildFly

This tutorial will teach you how to configure the max-post-size in WildFly application server.

wildfly max-post size

Out of the box, the default max-post-size can be checked by the following CLI command, which queries the http listener:

    "outcome" => "success",
    "result" => {
        "allow-encoded-slash" => false,
        "max-parameters" => 1000,
        "max-post-size" => 10485760L,                    
        "max-processing-time" => 0L,
        "url-charset" => "UTF-8",
        "worker" => "default",
        "write-timeout" => undefined

In order to vary the max-post-size you can simply set this attribute to a value that fits your needs:

/subsystem=web/connector=http:write-attribute(name=max-post-size, value=20971520)

You can disable the check on the max-post-size with the following CLI command

/subsystem=web/connector=http:write-attribute(name=max-post-size, value=0)

Be careful! Removing the limit of max-post-size is a potential issue for security as you will be exposed to DDOS attacks! It is recommended, instead to properly configure the max-post-size to a valid attribute.