メンチカツには醤油でしょ!!

ITエンジニア徒然 (AWS/Java/Node.js/Google Apps Script/Spreadsheets/Docker/Jenkins/コミュニティ・勉強会レポ)

大きなファイルサイズのアップロード時にRequest exceeded size limit! FileUploadBase$SizeLimitExceededException the request was rejected because its size exceeds the configured maximum

タイトル長くてスミマセン。

環境

Wildfly 10.1.0.Final
Struts 2.3.34

最初に解決方法を書いておきます

Wildfly設定 (standalone.xml)

<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" />

<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" max-post-size="1073741824" />

struts.xml

<struts>
<!-- 略 -->
<constant name="struts.multipart.maxSize" value="10485760" /><!-- 10MB -->
<constant name="struts.multipart.parser" value="jakarta-stream" />
<!-- 略 -->
</struts>

※ InterceptorStackにdefaultStackが入っているか、もしくはfileUploadが含まれていること。

messages.properties

struts.message.upload.error.FileSizeLimitExceededException=ファイルサイズが大きすぎます。

説明

Wildflyは大きなサイズのリクエストを受けるとコネクションをターミネートするようになっています。この場合
java.io.IOException: UT000020: Connection terminated as request was larger than 1073741824
がスタックに出力されると思います。(1073741824は設定されている最大サイズ)
Chromeでは ERR_CONNECTION_RESET が表示されているのが確認できます。
まずこの設定されているサイズを大きくするのが、Wildflyの設定(standalone.xml)です。

一方Struts2では、サイズのチェックを行い、サイズオーバーであればエラーとするような設定をstruts.xmlに行います。
struts.multipart.maxSize にサイズを設定します。
10MBであれば、10 * 1024 * 1024 = 10485760 [byte]といった計算をして設定します。

この場合に発生するExceptionは、InterceptorStackのExceptionではハンドリングできないので、エラーメッセージはmessage.propertiesに、struts.message.upload.error.FileSizeLimitExceededException をキーにエラーメッセージを設定します。

スタック

検索用も兼ねて。こんなスタックが出ます。
リクエストサイズが大きすぎる場合にWildflyから出力されるスタック。

HH:mm:SS,SSS ERROR [stderr] (default task-10) java.io.IOException: UT000020: Connection terminated as request was larger than 1073741824
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:168)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:229)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:209)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2265)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.xnio.channels.Channels.readBlocking(Channels.java:294)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:168)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:144)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:999)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:903)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at java.io.InputStream.read(InputStream.java:101)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:100)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:70)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartStream.java:593)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.MultipartStream.discardBodyData(MultipartStream.java:617)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartStream.java:634)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.findNextItem(FileUploadBase.java:1023)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:1003)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.commons.fileupload.servlet.ServletFileUpload.getItemIterator(ServletFileUpload.java:154)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.processUpload(JakartaStreamMultiPartRequest.java:287)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.parse(JakartaStreamMultiPartRequest.java:248)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:84)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:849)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.struts2.dispatcher.ng.PrepareOperations.wrapRequest(PrepareOperations.java:138)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
HH:mm:SS,SSS ERROR [stderr] (default task-10) 	at java.lang.Thread.run(Thread.java:748)
HH:mm:SS,SSS ERROR [stderr] (default task-11) java.io.IOException: UT000020: Connection terminated as request was larger than 1073741824
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:168)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:229)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:209)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2265)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.xnio.channels.Channels.readBlocking(Channels.java:294)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:168)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:144)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:999)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:903)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at java.io.InputStream.read(InputStream.java:101)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:100)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.util.Streams.copy(Streams.java:70)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.MultipartStream.readBodyData(MultipartStream.java:593)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.MultipartStream.discardBodyData(MultipartStream.java:617)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.MultipartStream.skipPreamble(MultipartStream.java:634)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.findNextItem(FileUploadBase.java:1023)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:1003)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.commons.fileupload.servlet.ServletFileUpload.getItemIterator(ServletFileUpload.java:154)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.processUpload(JakartaStreamMultiPartRequest.java:287)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.parse(JakartaStreamMultiPartRequest.java:248)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:84)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:849)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.struts2.dispatcher.ng.PrepareOperations.wrapRequest(PrepareOperations.java:138)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
HH:mm:SS,SSS ERROR [stderr] (default task-11) 	at java.lang.Thread.run(Thread.java:748)

こちらはStruts2から出力されるサイズオーバーのスタックです。

HH:mm:SS,SSS INFO  [stdout] (default task-8) YYYY/MM/DD HH:mm:SS:SSS WARN  Request exceeded size limit!
HH:mm:SS,SSS INFO  [stdout] (default task-8) org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (13144152) exceeds the configured maximum (10485760)
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:968) ~[commons-fileupload-1.3.2.jar:1.3.2]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310) ~[commons-fileupload-1.3.2.jar:1.3.2]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334) ~[commons-fileupload-1.3.2.jar:1.3.2]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parseRequest(JakartaMultiPartRequest.java:192) ~[struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.processUpload(JakartaMultiPartRequest.java:131) ~[struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse(JakartaMultiPartRequest.java:92) ~[struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:84) [struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:849) [struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.ng.PrepareOperations.wrapRequest(PrepareOperations.java:138) [struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) [struts2-core-2.3.32.jar:2.3.32]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) [wildfly-undertow-10.1.0.Final.jar!/:10.1.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) [wildfly-undertow-10.1.0.Final.jar!/:10.1.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805) [undertow-core-1.4.0.Final.jar!/:1.4.0.Final]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144]
HH:mm:SS,SSS INFO  [stdout] (default task-8) 	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]

雑感

結局Wildflyで指定しているサイズをオーバーした時はブラウザは
ERR_CONNECTION_RESET になるので、なんだか解決されていない感。

参考

stackoverflow.com

stackoverflow.com

https://teratail.com/questions/67329

Undertow subsystem configuration - WildFly 10 - Project Documentation Editor