当前位置:网站首页>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 .
边栏推荐
- 哈希表及完整注释
- 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
- Common fitting models and application methods of PCL
- dotConnect for DB2数据提供者
- [leetcode]Search for a Range
- Apifox,你的API接口文档卷成这样了吗?
- Compress JS code with terser
- Yyds dry goods inventory # solve the real problem of famous enterprises: maximum difference
- 一本揭秘字节万台节点ClickHouse背后技术实现的白皮书来了!
猜你喜欢

leetcode:736. Lisp 语法解析【花里胡哨 + 栈 + 状态enumaotu + slots】

3D laser slam: time synchronization of livox lidar hardware

leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】

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

Lombok同时使⽤@Data和@Builder 的坑

Statistics of radar data in nuscenes data set

Summer Challenge database Xueba notes (Part 2)~

How to build a 32core raspberry pie cluster from 0 to 1

3--新唐nuc980 kernel支持jffs2, Jffs2文件系统制作, 内核挂载jffs2, uboot网口设置,uboot支持tftp

实施MES管理系统时,哪些管理点是需要注意的
随机推荐
Introduction to the internal structure of the data directory of PostgreSQL
fiddler的使用
postgresql之integerset
unity webgl自适应网页尺寸
dotConnect for DB2数据提供者
Cloud Mail .NET Edition
Halcon实例转OpenCvSharp(C# OpenCV)实现--瓶口缺陷检测(附源码)
运维管理系统有哪些特色
Work of safety inspection
The panel floating with the mouse in unity can adapt to the size of text content
What to do when encountering slow SQL? (next)
Station B's June ranking list - feigua data up main growth ranking list (BiliBili platform) is released!
MATLB|具有储能的经济调度及机会约束和鲁棒优化
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
牛客编程题--必刷101之双指针篇
3 -- Xintang nuc980 kernel supports JFFS2, JFFS2 file system production, kernel mount JFFS2, uboot network port settings, and uboot supports TFTP
Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
Linear list --- circular linked list
安德鲁斯—-多媒体编程