Reputation: 13121
I'm facing an issue with the HTTP source app in a spring cloud data flow stream.
org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
at org.springframework.core.io.buffer.LimitedDataBufferList.raiseLimitException(LimitedDataBufferList.java:98) ~[spring-core-5.3.10.jar:5.3.10]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ? org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.cloud.sleuth.instrument.web.TraceWebFilter [DefaultWebFilterChain]
|_ checkpoint ? org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
|_ checkpoint ? HTTP POST "/" [ExceptionHandlingWebHandler]
This happens when I try to post an HTTP request with huge body size to the HTTP endpoint.
I have tried setting the following property in the deployment which didn't help me:
app.http.spring.codec.max-in-memory-size: 10MB
spring cloud starter HTTP Kafka source app version used is 3.1.1
Does anyone have a clue about how to fix this?
This can be reproduced minimally in a standalone manner like below
java -jar http-source-kafka-3.1.1.jar
Upvotes: 1
Views: 348
Reputation: 121282
Thank you for raising this!
It turns out that HttpSupplierConfiguration
for that HTTP Source application doesn't take into account a ServerCodecConfigurer
auto-configured by Spring Boot, including the mentioned spring.codec.max-in-memory-size
property.
I have a fix like this: https://github.com/spring-cloud/stream-applications/pull/204, which is going to be merged soon.
Unfortunately there is no easy workaround for the out-of-the-box application. You may consider to implement your own source application with the custom HTTP Inbound Endpoint.
Upvotes: 1