You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I uploaded a large JSON structure (a menu tree) from the frontend. When it reaches the gateway, it throws the following error:
DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
I’m using Spring 6 and Spring Cloud Gateway 4.
The first approach doesn’t work
spring:
codec:
max-in-memory-size: 10MB
cloud:
gateway:
httpclient:
response-timeout: 30s
connect-timeout: 10000
The second approach doesn’t work @bean
public WebFluxConfigurer webFluxConfigurer() {
return new WebFluxConfigurer() { @OverRide
public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
configurer.defaultCodecs().maxInMemorySize(10 * 1024 * 1024);
}
};
}