Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maybe write overflow #551

Closed
linjianliang7072 opened this issue Mar 21, 2019 · 2 comments
Closed

maybe write overflow #551

linjianliang7072 opened this issue Mar 21, 2019 · 2 comments
Labels
question Further information is requested

Comments

@linjianliang7072
Copy link

Your question

参数较大,500并发做压力测试的时候,出现“Unique key [xxxx] maybe write overflow"的异常

Your scenes

describe your use scenes (why need this feature)

Your advice

describe the advice or solution you'd like

Environment

  • SOFARPC version:5.5.2
  • JVM version (e.g. java -version):1.8
  • OS version (e.g. uname -a):linux
  • Maven version:
  • IDE version:
@leizhiyuan
Copy link
Contributor

leizhiyuan commented Mar 21, 2019

原因

RPC在写出数据的时候,会检测当前的ChannelOutboundBuffer的大小,如果超过了WRITE_BUFFER_HIGH_WATER_MARK(默认64K),就会限流,报write overflow的异常。
这个是为了保护客户端,防止无界的ChannelOutboundBuffer被打爆,导致资源耗尽。
通常情况下,网络有问题,导致写出失败;或者下游压力太大,不能处理这么多网络包的时候会出现这样的异常。

解决办法:

建议首先排查网络环境(网卡打满也是一种)
网络环境没问题的情况下,看下是否是流量过大,导致下游处理不过来。,如果是这种,可能意味着,这就是压测的瓶颈了。可以评估下游扩容,性能优化等方式来解决。
如果确实认为64k 也不够用. 可以自行调整

-Dbolt.netty.buffer.low.watermark
-Dbolt.netty.buffer.high.watermark
值自己算一下,默认是32*1024 和64*1024

@leizhiyuan leizhiyuan added the question Further information is requested label Mar 21, 2019
@leizhiyuan
Copy link
Contributor

那没问题的话, 我先关掉了?如果还有疑问,可以再打开。谢谢~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants