@ -91,12 +91,6 @@ final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Build
@@ -91,12 +91,6 @@ final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Build
@ -106,6 +100,11 @@ final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Build
@@ -106,6 +100,11 @@ final class DefaultExchangeStrategiesBuilder implements ExchangeStrategies.Build
@ -81,8 +81,9 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@@ -81,8 +81,9 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@ -208,13 +209,6 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@@ -208,13 +209,6 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
Assert.notNull(strategies,"ExchangeStrategies must not be null");
this.strategies=strategies;
returnthis;
@ -222,6 +216,9 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@@ -222,6 +216,9 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@ -274,11 +271,11 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@@ -274,11 +271,11 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@ -41,14 +41,12 @@ The following example configures <<web-reactive.adoc#webflux-codecs, HTTP codecs
@@ -41,14 +41,12 @@ The following example configures <<web-reactive.adoc#webflux-codecs, HTTP codecs
@ -96,12 +94,9 @@ modified copy without affecting the original instance, as the following example
@@ -96,12 +94,9 @@ modified copy without affecting the original instance, as the following example
[[webflux-client-builder-maxinmemorysize]]
=== MaxInMemorySize
Spring WebFlux configures by default a maximum size for buffering data in-memory when decoding
HTTP responses with the `WebClient`. This avoids application memory issues if the received
response is much larger than expected.
The default configured value of 256KB might not be enough for your use case, and your application
might hit that limit with the following:
Spring WebFlux configures <<web-reactive.adoc#webflux-codecs-limits,limits>> for buffering
data in-memory in codec to avoid application memory issues. By the default this is
configured to 256KB and if that's not enough for your use case, you'll see the following:
----
org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer
@ -113,8 +108,8 @@ You can configure this limit on all default codecs with the following code sampl
@@ -113,8 +108,8 @@ You can configure this limit on all default codecs with the following code sampl
@ -124,14 +119,16 @@ You can configure this limit on all default codecs with the following code sampl
@@ -124,14 +119,16 @@ You can configure this limit on all default codecs with the following code sampl
@ -833,7 +833,8 @@ To configure buffer sizes, you can check if a given `Decoder` or `HttpMessageRea
@@ -833,7 +833,8 @@ To configure buffer sizes, you can check if a given `Decoder` or `HttpMessageRea
exposes a `maxInMemorySize` property and if so the Javadoc will have details about default
values. In WebFlux, the `ServerCodecConfigurer` provides a
<<webflux-config-message-codecs,single place>> from where to set all codecs, through the
`maxInMemorySize` property for default codecs.
`maxInMemorySize` property for default codecs. On the client side, the limit can be changed
in <<web-reactive.adoc#webflux-client-builder-maxinmemorysize, WebClient.Builder>>.
For <<webflux-codecs-multipart,Multipart parsing>> the `maxInMemorySize` property limits
the size of non-file parts. For file parts it determines the threshold at which the part