JasonKai9527 opened a new issue #9629: URL: https://github.com/apache/dubbo/issues/9629
- [1] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. ### Environment * Dubbo version: (,3.0.5] ### Steps to reproduce this issue 1. provider export service by rest protocol 2. consumer do refer by rest protocol 3. provider repeated reboots 4. jmap -dump:live,format=b,file=dump.hprof ${consumer pid} First of all, you will find that the memory used by the client keeps growing, gc appears frequently, and eventually oom occurs. reason: During the doRefer process in RestProtocol, a new client and connectionManager will be created when the server restarts. Howerver, the cache is not cleared when the invoker is destroyed. So,as long as the client doesn't restart the size of the cache will keep increasing. ### Expected Behavior When the invoker is destroyed, it is not enough to clear the cache of the invoker, we also need to clear the cache of the client and the connectionManager. ### solution org.apache.dubbo.rpc.protocol.AbstractInvoker#destroy Add the handling of destroying useless clients and connectionManagers in subclasses(RestProtocol) The client and connectionManger can be located by url. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
