In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "server memory leak case analysis", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "server memory leak case analysis" bar!
1. cause
Online services are often inaccessible after providing access for a period of time or for too long, and there are a variety of reasons for the problems. This time it's a memory leak.
two。 Tool installation
The production tool is Jetbrains Idea and the memory analysis tool Jprofiler is used.
First of all, install Jprofiler, because it is a fee-based software, I choose to apply it here for 10 days
Then install the Jprofiler plug-in in Idea
After installing the profiler plug-in, restart Idea, and a small icon will appear here
Click the small icon to start your project using the Jprofiler tool. The first launch here will require you to configure the startup file of the Jprofiler tool as shown below:
Tips: the file location is in the bin directory of the Jprofiler installation directory, jprofiler.exe.
Choose Evaluate trial here
3. Use analysis tools
Open Live memory and check the All Objects option. On the left is the amount of memory occupied by various objects and the number of instances
Select Run Gc here, then execute Mark current to save a snapshot of the memory situation, and then execute Start Recordings
Access the page where there is a memory leak, execute Stop Recordings after the access is complete, and then execute Run Gc
The red columns in the image below are the objects that are not GC.
Select the object instance that appears red as follows, and execute show selection in heap walker
Execute use selected objects, select references
Select show paths to gc root
The object in the image above is the culprit for the memory leak.
After looking through the official update document of thymeleaf-layout-dialect, I found that the official problem of memory leak has been dealt with, and the problem has been resolved after upgrading the jar package.
4 Summary
Thymeleaf-layout-dialect had a memory leak before version 2.0.0. After 2.0.1, officials began to notice the problem and began to solve it step by step. Version 2.4.1 is currently used to solve the problem. Dependencies are as follows:
Org.thymeleaf thymeleaf 3.0.11.RELEASE ognl ognl org.thymeleaf thymeleaf-spring3 3.0.11.RELEASE nz.net.ultraq.thymeleaf thymeleaf-layout-dialect 2.4.1 thymeleaf org.thymeleaf to this point, I believe you have a better understanding of the "server memory leak case analysis" You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.