Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve RequestTooBigException, connection terminated as request was larger than 10485760?

I'm trying to upload a 6MB file to my JHipster app server. However, I get the following error. Where can I find the related configuration?

io.undertow.server.RequestTooBigException: UT000020: Connection terminated as request was larger than 10485760
at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:168)
at io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:229)
at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
at io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:209)
at io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2332)
at org.xnio.channels.Channels.readBlocking(Channels.java:294)
at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:192)
at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:168)
at io.undertow.server.handlers.form.MultiPartParserDefinition$MultiPartUploadHandler.parseBlocking(MultiPartParserDefinition.java:213)
at io.undertow.servlet.spec.HttpServletRequestImpl.parseFormData(HttpServletRequestImpl.java:792)
like image 771
user1723583 Avatar asked Apr 26 '18 15:04

user1723583


1 Answers

In addition to maslbl4 answer, for those who uses " .yml " configuration file like me, use the following code :

spring:
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB

It worked fine for me .

like image 87
chafik gouasmia Avatar answered Sep 16 '22 12:09

chafik gouasmia