CDan
CDan

Reputation: 133

Set Max In Memory Size In Spring Webflux

I am receiving the following error in a Spring Boot application using WebFlux

org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144

I tried setting the limit inside application.yml with

spring:
  codec:
    max-in-memory-size: 10MB

Or by adding the following to a WebClient configuration class but they are ignored.

.exchangeStrategies(ExchangeStrategies.builder()
        .codecs(clientCodecConfigurer -> clientCodecConfigurer
                .defaultCodecs()
                .maxInMemorySize(10 * 1024 * 1024)
        )
        .build()
)

I am Using Spring Boot 2.3.3.RELEASE.

Do you have any idea on what the problem might be?

Upvotes: 12

Views: 12821

Answers (1)

Andrea Ciccotta
Andrea Ciccotta

Reputation: 672

you can add the following configuration:

enter image description here

enter image description here

Upvotes: 3

Related Questions