Configuring WildFly upload file size
If you implement a file upload in your web front end and want to send the data to the WildFly with HTTP POST, the WildFly will put a stop to it as soon as a certain file size is exceeded. The default value for the size of a POST request is 10MB.

So how to configure WildFly upload file limit ? In order to do that, change the max-post-size attribute in the undertow subsystem:
/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-post-size,value=25485760)
The value for max-post-size is expressed in bytes.
That command will result in the following configuration:
<subsystem xmlns="urn:jboss:domain:undertow:3.0">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" max-post-size="25485760" redirect-socket="https" socket-binding="http"/>
<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>
You can also disable the max post size limit by setting the max-post-size parameter to 0. Run the following CLI command:
/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-post-size,value=0)
Finally, itβs worth mentioning that, if you are running a Front-End Web server (such as Nginx), you have to apply your configuration there.
As an example, to set in http block which affects all server blocks (virtual hosts), add the following configuration to Nginx:
http {
...
client_max_body_size 100M;
}
Related articles: Using REST Services to manage download and upload of files
Recommended Articles
Configure Max-Post-Size in WildFly Application Server for Secure API Requests
Learn how to set and configure the max-post-size in WildFly application server for secure API requests, with examples and best practices.
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.
Configuring Nginx with WildFly for Load Balancing and High Availability
Learn how to configure nginx as a load balancer in front of a cluster of WildFly servers, including setup, configuration, and balancing options.
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.