sofa-ark
sofa-ark copied to clipboard
Unloading modules using the combined deployment feature of sofa-ark does not release related connections such as redis, rpc, etc.
现象是,多次部署加载与卸载模块时(该模块会创建redis连接,rpc连接),通过netstat发现,连接并未释放,每动态部署模块时,就会添加一个连接
Hi @grindwheel, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.
The phenomenon is that when the load and unload module is deployed multiple times (the module will create a redis connection, rpc connection), through the netstat discovery, the connection is not released, each time the module is dynamically deployed, a connection is added.
现象是,多次部署加载与卸载模块时(该模块会创建redis连接,rpc连接),通过netstat发现,连接并未释放,每动态部署模块时,就会添加一个连接
可以把你的 demo 提供下吗
@glmapper 我完全集成的项目里了,demo不好提供,很好复现的,合并部署的功能,模块卸载有些是无法卸载的(socket连接,定时任务等),你们自己内部试下就知道了
@glmapper 我完全集成的项目里了,demo不好提供,很好复现的,合并部署的功能,模块卸载有些是无法卸载的(socket连接,定时任务等),你们自己内部试下就知道了
OK ,我尝试下
@glmapper 有结果吗
@glmapper 有结果吗
类似问题我们遇到过,目前提供一种可行的方案是通过监听模块卸载事件或者 spring 上下文关闭事件来动态释放 socket 和 定时任务以及类似的例如缓存、线程池等
cc @yuanyuancin 关注。
建议按照 @glmapper 提供方式,如果还有问题可以重新打开 issue