wallaceyoung opened a new issue #9663:
URL: https://github.com/apache/dubbo/issues/9663


   <!-- If you need to report a security issue please visit 
https://github.com/apache/dubbo/security/policy -->
   
   - [ ] 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: 2.7.9
   * Operating System version: linux
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1.dubbo线程数设置为250
   2.偶尔序列化大对象,约18M
   3.dump文件发现单个dubbo线程占用heap空间过大,导致频繁full gc,且full gc后内存回收很少。
   
3.Hessian2Input对象被ThreadLoacal复用,无法回收。成员变量_sbuf重置方法为_sbuf.setLength(0),StringBuilder底层char数组只会重置指针,不会清空数据,如果序列化过大对象,char数组里面会保留很多无效数据,建议Hessian2Input#reset时调用_sbuf.trimToSize方法清理。
   
![image](https://user-images.githubusercontent.com/23181941/153159133-1f0bbf13-6dd3-43af-994b-0c766cf3ba8c.png)
   
   


-- 
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]

Reply via email to