springcloud gateway Exceeded limit on max bytes to buffer : 262144

问题:springcloud gateway 框架做的一个项目,接口再请求时,出现上传数据小不会抛出问题,一旦请求报文数据大就会抛出问题

2020-02-26 21:16:26.540 ERROR 8 --- [reactor-http-epoll-78] o.s.c.g.h.RoutePredicateHandlerMapping   : Error applying predicate for route: 8e9a9879-83ff-4abd-8308-ec5956194b7a

org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
at org.springframework.core.io.buffer.LimitedDataBufferList.raiseLimitException(LimitedDataBufferList.java:101) ~[spring-core-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.core.io.buffer.LimitedDataBufferList.updateCount(LimitedDataBufferList.java:94) ~[spring-core-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at org.springframework.core.io.buffer.LimitedDataBufferList.add(LimitedDataBufferList.java:59) ~[spring-core-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
at reactor.core.publisher.MonoCollect$CollectSubscriber.onNext(MonoCollect.java:119) [reactor-core-3.3.0.RELEASE.jar!/:3.3.0.RELEASE]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1592) ~[reactor-core-3.3.0.RELEASE.jar!/:3.3.0.RELEASE]
at reactor.core.publisher.FluxCallable.subscribe(FluxCallable.java:49) ~[reactor-core-3.3.0.RELEASE.jar!/:3.3.0.RELEASE]
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:55) ~[reactor-core-3.3.0.RELEASE.jar!/:3.3.0.RELEASE]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150) ~[reactor-core-3.3.0.RELEASE.jar!/:3.3.0.RELEASE]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.0.RELEASE.jar!/:3.3.0.RELEASE]
at reactor.core.publisher.FluxMa

找了好多资料,尝试了很多方法,也更改配置了

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

然而并没有什么卵用

解决方式:我原来是从springboot2.2.0升级到springboot2.2.1,降回去就好了,亲测有效,没有再出现上边的问题

<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>2.2.0.RELEASE</version>
	<relativePath/> <!-- lookup parent from repository -->
</parent>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值