Quarkus - 413 Request Entity Too Large
Asked Answered
T

2

6

I am developing a Quarkus application and using RESTEasy Reactive. One of the endpoints receives a multipart/form-data mime type object but when I try to use it sometimes the "413 - Request Entity too Large" error occurs.

Toliver answered 6/8, 2022 at 23:24 Comment(0)
T
6

After digging the Quarkus documentation, the property you really need to configure is this:

quarkus.http.limits.max-form-attribute-size

I have set this to 4M (4 megabytes), like this, on my application.yaml file, but of course you can configure it for any value you may want:

quarkus:
    http:
        limits:
            max-form-attribute-size: 4M

Keep in mind that if you are using an application.properties file instead, you should do it like this:

quarkus.http.limits.max-form-attribute-size=4M
Toliver answered 6/8, 2022 at 23:24 Comment(1)
what is the default value ?Hayward
S
4

My very same problem does not solve by @hugo solution. I fixed it using property quarkus.http.limits.max-body-size

Sensitivity answered 15/4, 2023 at 8:22 Comment(1)
I would say that property works when you have an endpoint that receives a JSON as the body. For the scenario of this question we are receiving a multipart/form-data so the max-form-attribute-size should be usedToliver

© 2022 - 2024 — McMap. All rights reserved.