当前位置:网站首页>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 .
边栏推荐
- Infrared camera: juge infrared mag32 product introduction
- Have fun | latest progress of "spacecraft program" activities
- pgpool-II和pgpoolAdmin的使用
- 软件测试——Jmeter接口测试之常用断言
- CSDN summer camp course project analysis
- MySQL
- Statistics of radar data in nuscenes data set
- 数论 --- 快速幂、快速幂求逆元
- Douban average 9 x. Five God books in the distributed field!
- Lombok makes the pit of ⽤ @data and @builder at the same time
猜你喜欢

软件测试——Jmeter接口测试之常用断言

Lumion 11.0 software installation package download and installation tutorial

Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?

人脸识别应用解析

Lidar: introduction and usage of ouster OS

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

unity中跟随鼠标浮动的面板,并可以自适应文字内容的大小

Detailed explanation of line segment tree (including tested code implementation)
![[server data recovery] data recovery case of a Dell server crash caused by raid damage](/img/29/e07bf1f8eae9be19f6eed69be5642d.jpg)
[server data recovery] data recovery case of a Dell server crash caused by raid damage

用全连接+softmax对图片的feature进行分类
随机推荐
安德鲁斯—-多媒体编程
[leetcode]Search for a Range
Statistics of radar data in nuscenes data set
What to do when encountering slow SQL? (next)
Use of fiddler
真实项目,用微信小程序开门编码实现(完结)
Processus général de requête pour PostgreSQL
Hash table and full comments
CDB PDB user rights management
C#/VB. Net to delete watermarks in word documents
GEE升级,可以实现一件run tasks
Compress JS code with terser
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
Safety delivery engineer
AWS learning notes (I)
[C # notes] reading and writing of the contents of text files
Go swagger use
The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
S120驱动器基本调试步骤总结
Argo workflows source code analysis