当前位置:网站首页>Remember the problem analysis of oom caused by a Jap query
Remember the problem analysis of oom caused by a Jap query
2022-07-07 02:38:00 【Code Marathon】
background
I met online some time ago OOM problem , After investigation and analysis, it is found that there is an interface that returns too much data at one time ( about 200W A result set ), However, although there is a large amount of interface data for the problem , But the returned data has only one length 7 Of string Type field , therefore 200W About a dozen M, This is not enough to cause OOM.
make a concrete analysis
Direct analysis cannot explain the cause OOM The reason why the , That's only simulation , So I started a local Interfaces simulate the amount of data returned , Found that the memory consumption is huge , Far more than a dozen M, So the heap memory is exported for analysis .

Through heap memory analysis, we can see , Original 7 Bytes of string type , Packaged into various objects , And after being packaged, the occupied space increases dramatically , Finally achieve 1G many .

Conclusion
Finally due to JPA The encapsulation of various objects produced 1G Excessive memory consumption , Eventually lead to OOM.
therefore ,JPA Although it is very convenient to use , But that's why , If you don't understand its principle , You'll still step on many holes .
Easy to use , Principle is not easy , And the use and cherish .
边栏推荐
- fasterxml ToStringSerializerBase报错
- C#/VB.NET 删除Word文檔中的水印
- [leetcode]Search for a Range
- Mmdetection3d loads millimeter wave radar data
- This week's hot open source project!
- Web3对法律的需求
- [xlua notes] array of lua to array of C #
- Web3的先锋兵:虚拟人
- Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?
- The so-called consumer Internet only matches and connects industry information, and does not change the industry itself
猜你喜欢

Web3对法律的需求

AWS学习笔记(一)

Pioneer of Web3: virtual human

MATLB|具有储能的经济调度及机会约束和鲁棒优化

MES管理系统的应用和好处有哪些

你不可不知道的Selenium 8种元素定位方法,简单且实用

实施MES管理系统时,哪些管理点是需要注意的

The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
![[Mori city] random talk on GIS data (II)](/img/5a/dfa04e3edee5aa6afa56dfe614d59f.jpg)
[Mori city] random talk on GIS data (II)

leetcode:736. Lisp 语法解析【花里胡哨 + 栈 + 状态enumaotu + slots】
随机推荐
牛客编程题--必刷101之双指针篇
Alibaba cloud middleware open source past
Web3的先锋兵:虚拟人
postgresql之整體查詢大致過程
What to do when encountering slow SQL? (next)
[C # notes] use file stream to copy files
基于ensp防火墙双击热备二层网络规划与设计
Wireshark installation
[unity notes] screen coordinates to ugui coordinates
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
Processus général de requête pour PostgreSQL
dotConnect for DB2数据提供者
如何从0到1构建32Core树莓派集群
Infrared camera: juge infrared mag32 product introduction
Summer Challenge database Xueba notes (Part 2)~
4 -- Xintang nuc980 mount initramfs NFS file system
Data connection mode in low code platform (Part 1)
3--新唐nuc980 kernel支持jffs2, Jffs2文件系统制作, 内核挂载jffs2, uboot网口设置,uboot支持tftp
电气工程及其自动化
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files