-
Notifications
You must be signed in to change notification settings - Fork 47
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
Hessian2Input _sbuf memory leak #56
Comments
目前的解决方案是对Hessian2Serialization打了补丁
|
请问,这个有修复版本吗,我遇到了同样的问题,因为是固定线程数,而且数量比较大,导致了OOM |
Hessian2Input 的 ThreadLocal 在 Dubbo 高版本已经移除,可以升级 3.1.7 版本看下 |
这是生产的应用,涉及的老应用较多,大版本升级估计不太可能,不考虑出修复版本吗 |
2.7.x 版本目前已经是仅安全维护状态了,而且将在下个月发布正式 EOL。目前最新的开发版本是 3.2.0。 如果升级过程中有任何问题可以提交 issue,对于大规模集群也可以联系我们提供专门的协助。 |
Environment
Steps to reproduce this issue
1.dubbo线程数设置为250
![image](https://user-images.githubusercontent.com/23181941/153159133-1f0bbf13-6dd3-43af-994b-0c766cf3ba8c.png)
2.偶尔序列化大对象,约18M
3.dump文件发现单个dubbo线程占用heap空间过大,导致频繁full gc,且full gc后内存回收很少。
3.Hessian2Input对象被ThreadLoacal复用,无法回收。成员变量_sbuf重置方法为_sbuf.setLength(0),StringBuilder底层char数组只会重置指针,不会清空数据,如果序列化过大对象,char数组里面会保留很多无效数据,建议Hessian2Input#reset时调用_sbuf.trimToSize方法清理。
The text was updated successfully, but these errors were encountered: