当前位置:网站首页>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 .
边栏推荐
猜你喜欢

unity 自定义webgl打包模板

3 -- Xintang nuc980 kernel supports JFFS2, JFFS2 file system production, kernel mount JFFS2, uboot network port settings, and uboot supports TFTP

FLIR blackfly s usb3 industrial camera: how to use counters and timers

如何设计好接口测试用例?教你几个小技巧,轻松稿定

Lumion 11.0 software installation package download and installation tutorial

Wireshark installation

MMDetection3D加载毫米波雷达数据

Apifox, is your API interface document rolled up like this?

服装企业部署MES管理系统的五个原因

普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
随机推荐
[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks
Data connection mode in low code platform (Part 1)
STM32项目 -- 选题分享(部分)
A new path for enterprise mid Platform Construction -- low code platform
widerperson数据集转化为YOLO格式
牛客编程题--必刷101之双指针篇
leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
PCL 常用拟合模型及使用方法
fiddler的使用
Alibaba cloud middleware open source past
人脸识别应用解析
Application analysis of face recognition
[node learning notes] the chokidar module realizes file monitoring
MATLB|具有储能的经济调度及机会约束和鲁棒优化
AWS学习笔记(一)
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
QPushButton-》函数精解
Infrared camera: juge infrared mag32 product introduction
Argo workflows source code analysis