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:

/subsystem=undertow/server=default-server/http-listener=default:read-resource(include-runtime=true)
{
    "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.


Recommended Articles

Configure WildFly Upload File Size Limit | Enterprise Java Tutorials

Learn how to configure WildFly's upload file size limit using the undertow subsystem. Get step-by-step instructions on setting max-post-size attribute values, disabling limits, and applying configurations to Front-End Web servers like Nginx.

Configure JVM Settings in WildFly/JBoss EAP Domain for Optimal Performance

Learn how to configure JVM settings in a WildFly/JBoss EAP domain for optimal performance and scalability. Get expert tips on configuring heap size, max-size, Garbage Collection Algorithms, and more.

Optimize Server Performance with Advanced WildFly and JBoss EAP Concurrency Settings

Learn how to configure max concurrent request limits at server, connector, and application levels in WildFly and JBoss EAP for improved performance. #WildFly #JbossEAP #JavaConcurrency

Monitor and Calculate HTTP Session Size in WildFly Cluster - Updated Tutorial

Learn how to monitor and calculate HTTP session size in WildFly cluster with various methods including Heap Dump.