知识卡片
资源泄漏须在重启前取证
垃圾收集不会回收仍被长期对象或静态对象引用的无用数据,连接、文件描述符和池对象也会泄漏。长跑测试能发现常见路径,但少见异常路径还需线上指标观察。发现增长时尽可能在重启前保留堆、连接和资源证据,否则难以重现;轮流重启可以限制累积影响,却不能替代定位根因。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 构建稳定系统 · 查看原书依据
A memory leak can cause system memory to grow and eventually crash. Even with garbage collection, memory leaks are possible. Objects referenced from long-running or static objects are not cleaned, and they can lead to memory leaks.
参考来源
- 位置:《Software Architecture and Decision-Making》第12章《Building Stable Systems》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch12.xhtml)
- 结论依据:摘录说明垃圾收集不会回收仍被长期对象或静态对象引用的无用数据,连接、文件描述符和池对象也会泄漏。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:A memory leak can cause system memory to grow and eventually crash. Even with garbage collection, memory leaks are possible. Objects referenced from long-running or static objects are not cleaned, and they can lead to memory leaks.