2
14:55:23,465 ERROR [stderr] (default task-1) io.undertow.server.RequestTooBigException: UT000020: Connection terminated as request was larger than 209715200
14:55:23,465 ERROR [stderr] (default task-1)    at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:168)
14:55:23,465 ERROR [stderr] (default task-1)    at io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:229)
14:55:23,465 ERROR [stderr] (default task-1)    at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
14:55:23,465 ERROR [stderr] (default task-1)    at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:209)
14:55:23,466 ERROR [stderr] (default task-1)    at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2337)
14:55:23,466 ERROR [stderr] (default task-1)    at org.xnio.channels.Channels.readBlocking(Channels.java:294)
14:55:23,466 ERROR [stderr] (default task-1)    at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:192)
14:55:23,466 ERROR [stderr] (default task-1)    at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:168)
14:55:23,466 ERROR [stderr] (default task-1)    at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:1027)
14:55:23,466 ERROR [stderr] (default task-1)    at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:931)
14:55:23,466 ERROR [stderr] (default task-1)    at java.io.InputStream.read(InputStream.java:101)
14:55:23,466 ERROR [stderr] (default task-1)    at org.apache.commons.fileupload.util.Streams.copy(Streams.java:98)
14:55:23,467 ERROR [stderr] (default task-1)    at org.apache.commons.fileupload.util.Streams.copy(Streams.java:68)

Here is the appropriate configuration in standalone.xml Where max-post-size is set to "1073741824" bytes (wanted 1GB) Is there an underlying limit of 200MB? With the whole file search for this 209715200, inside wildfly server folder, i did not find any.

<subsystem xmlns="urn:jboss:domain:undertow:5.0">
            <buffer-cache name="default"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http" max-post-size="1073741824" redirect-socket="https" enable-http2="true" no-request-timeout="600000" />
                <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                </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/11"/>
                <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
            </filters>
        </subsystem>
gsakthivel
  • 365
  • 3
  • 17
  • 1
    Two things I can think of: 1. did you check the startup logs? I had a duplicate copy in the home directory of the user starting the server and this was used instead. 2. did you check whether this might be set by a startup option? this might also tell you which configuration file is being used. – Snorik Aug 03 '20 at 19:48

1 Answers1

1

There is a command line interface (jboss server bin folder). Updating the size using that command line is working. following is the command to set it approximately above 700MB In the wildfly server bin folder, since I am on Windows, there is a jboss-cli.bat If we run it, and connect, then we can do the following command to set it. /subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-post-size,value=754857600)

we can also do read-attribute without any parameters to see what has been set now

Another crazy thing was this project was using very old struts (1.3.x). This struts framework has a default file upload size limit of 250MB. With the whole internet (and myself) forgot about struts 1.x, this was hard to find. Anyways, the controller settings in struts-config.xml has a maxFileSize setting that we can set to. Otherwise, the default size is 250MB. <controller ... maxFileSize="750M" .../> will override the default.

gsakthivel
  • 365
  • 3
  • 17
  • 2
    What is the whole call you used for this and where is that persisted, or is this a startup option? – Snorik Aug 03 '20 at 20:14
  • 1
    Thx @Snorik for helping... This is more of the struts framework limitation – gsakthivel Aug 04 '20 at 05:30
  • 1
    @Snorik, you are right as well. i had another wildfly server folder sitting. however, the CLI command updated the running one, so the change to max-post-size got accepted. – gsakthivel Aug 04 '20 at 05:37