Closed little-cui closed 1 year ago
direct memory (used: 1006633239, max: 1020067840) 用超了,可以设置一下堆外内存的回收时间试一下
-Dio.grpc.netty.shaded.io.netty.allocation.cacheTrimIntervalMillis=
默认应该是2min
direct memory (used: 1006633239, max: 1020067840) 用超了,可以设置一下堆外内存的回收时间试一下
-Dio.grpc.netty.shaded.io.netty.allocation.cacheTrimIntervalMillis=
默认应该是2min
仔细读代码发现,异常场景下closeBiStream() throw异常会漏把netty链接关闭,可能导致直接内存泄漏 com.alibaba.nacos.core.remote.grpc.GrpcConnection#close
2023-04-24 14:51:59,163 WARN [1682347817385_198.19.131.24_2976] connection close exception : {}
java.lang.IllegalStateException: call already closed
at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
at io.grpc.internal.ServerCallImpl.closeInternal(ServerCallImpl.java:209)
at io.grpc.internal.ServerCallImpl.close(ServerCallImpl.java:202)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:371)
at com.alibaba.nacos.core.remote.grpc.GrpcConnection.closeBiStream(GrpcConnection.java:143)
at com.alibaba.nacos.core.remote.grpc.GrpcConnection.close(GrpcConnection.java:131)
at com.alibaba.nacos.core.remote.ConnectionManager.unregister(ConnectionManager.java:230)
仔细读代码发现,异常场景下closeBiStream() throw异常会漏把netty链接关闭,可能导致直接内存泄漏 com.alibaba.nacos.core.remote.grpc.GrpcConnection#close
2023-04-24 14:51:59,163 WARN [1682347817385_198.19.131.24_2976] connection close exception : {} java.lang.IllegalStateException: call already closed at com.google.common.base.Preconditions.checkState(Preconditions.java:508) at io.grpc.internal.ServerCallImpl.closeInternal(ServerCallImpl.java:209) at io.grpc.internal.ServerCallImpl.close(ServerCallImpl.java:202) at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:371) at com.alibaba.nacos.core.remote.grpc.GrpcConnection.closeBiStream(GrpcConnection.java:143) at com.alibaba.nacos.core.remote.grpc.GrpcConnection.close(GrpcConnection.java:131) at com.alibaba.nacos.core.remote.ConnectionManager.unregister(ConnectionManager.java:230)
应该不会, 这个错误是说连接重复进行关闭了,说明之前已经关闭了。
如果这个会有内存泄漏, 需要提给grpc修复,然后我们再升级版本。
至少在我们的环境中,目前还没有遇到过这个导致的内存溢出问题。关键还是控制堆外内存回收的频率和推送的tps等
No more response from author, I think this is a env problem.
could you tell me how to fix this? i get same question!
Describe the bug A clear and concise description of what the bug is.
3台4U8G机器的Nacos集群,部署了大概500个spring-cloud-alibaba框架微服务进程,然后出现部分实例反复上下线的问题。麻烦确认下
客户端日志
Nacos后端的日志 naming-server.log 反复打印:
Nacos后端的日志 nacos.log 反复打印:
Expected behavior A clear and concise description of what you expected to happen.
Actually behavior A clear and concise description of what you actually to happen.
How to Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context Add any other context about the problem here.