A method and device for exception handling based on garbage collection log

An exception handling and log technology, applied in the direction of electrical digital data processing, response error generation, instruments, etc., can solve problems such as thread deadlock, Java process consumes too much CPU, insufficient memory, etc., and achieves the goal of improving accuracy and efficiency Effect

Active Publication Date: 2022-08-02
中航金网(北京)电子商务有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In enterprise-level Java development, sometimes we encounter the following problems: memory overflow, insufficient memory, memory leak, thread deadlock, lock contention, Java process consumes too much CPU, etc.
The method of using memory usage to characterize the level of JVM load does not reflect the real load of JVM well.
When the memory usage rate is high, it is likely that the java objects in the JVM can be effectively recycled by the GC. In this case, the real situation of the JVM load is not high. If the memory usage rate is directly used to represent it, it will be misjudged as high Load, and then take a series of unnecessary response measures, affecting the user experience, for example, frequently sending risk warnings, frequently restricting user requests, etc.
When the memory usage rate is not very high, it is possible that the active threads in the JVM are rapidly creating java objects. According to the life cycle of java objects, such objects are generally difficult to be effectively recycled by the GC in a short period of time. As a result, the JVM quickly enters an overloaded state. In this case, the real situation of the JVM load is very high. If it is directly represented by the memory usage rate, it will be misjudged as a low-to-medium load, so it misses a good opportunity to take effective operation and maintenance measures. affect the stable operation of the system
[0004] Therefore, the current existing technology uses the memory usage rate to analyze the JVM load, which is prone to the problem of false alarm

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for exception handling based on garbage collection log
  • A method and device for exception handling based on garbage collection log

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0035] See figure 1 , showing a flowchart of a method for handling exceptions based on garbage collection logs provided by the first embodiment of the present invention. The method includes:

[0036] Step S10: according to the preset generation parameters of the GC log, generate the GC log and store it in the preset path;

[0037] Step S20: read the GC log in the preset path, and extract the data to be analyzed from the GC log; wherein, the data to be analyzed is used for abnormal analysis;

[0038] Step S30: Input the data to be analyzed into a preset identification model for identification, and obtain an abnormal analysis result;

[0039] Step S40: According to the abnormal analysis result, adjust the JVM parameters.

[0040]In this embodiment, through steps S10 to S40, the corresponding data to be analyzed is extracted after outputting the GC log; then the data to be analyzed is input into a preset recognition model for identification, and the corresponding abnormal anal...

no. 2 example

[0072] see figure 2, based on the same inventive concept, the second embodiment of the present invention provides an exception processing apparatus 300 based on garbage collection logs. The exception processing apparatus 300 based on garbage collection logs includes:

[0073] The log acquisition module 301 is used to generate the GC log according to the preset generation parameters of the GC log and store it in the preset path; the data extraction module 302 is used to read the GC log in the preset path, and from the preset path. The data to be analyzed is extracted from the GC log; wherein, the data to be analyzed is used for abnormal analysis; the identification module 303 is used for inputting the data to be analyzed into a preset identification model for identification, and an abnormal analysis result is obtained; optimization; Module 304, configured to adjust JVM parameters according to the exception analysis result.

[0074] As an optional implementation manner, it al...

no. 3 example

[0086] Based on the same inventive concept, this embodiment also provides an electronic device, including a processor and a memory, the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor When executing, the electronic device is caused to execute the steps of the method in any one of the foregoing method embodiments. It should be noted that, in the electronic device provided by the embodiment of the present invention, when the instruction is executed by the processor, the specific implementation of each step and the technical effect produced are the same as those in the foregoing method embodiment, which is a brief description. , for the parts not mentioned in this embodiment, reference may be made to the corresponding content in the foregoing method embodiments.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an exception processing method and device based on garbage collection logs, wherein the method includes: generating a GC log according to a preset generation parameter of a GC log and storing it in a preset path; reading in the preset path In the GC log, the data to be analyzed is extracted from the GC log; wherein, the data to be analyzed is used for abnormal analysis; the data to be analyzed is input into a preset recognition model for identification, and an abnormal analysis result is obtained; JVM parameters for tuning. The method and device of the present invention can comprehensively utilize all the data to be analyzed, so as to avoid only considering the memory usage in manual identification, and fail to identify the abnormality of high JVM load. Therefore, the method of this embodiment improves the accuracy and efficiency of anomaly identification.

Description

technical field [0001] The present invention relates to the technical field of computer software, and in particular, to a method and device for processing exceptions based on garbage collection logs. Background technique [0002] In the daily software development process, it is inevitable to handle exceptions. In enterprise-level Java development, sometimes we encounter the following problems: memory overflow, insufficient memory, memory leak, thread deadlock, lock contention, Java process consumes too much CPU, etc. The memory managed by the JVM (Java Virtual Machine, Java Virtual Machine) roughly includes three different types of memory areas: Permanent Generation space (permanent storage area), Heap space (heap area), and Java Stacks (Java stack). The permanent storage area mainly stores the information of Class (class) and Meta. When the Class is loaded for the first time, it is put into the PermGen space area. The content that the Class needs to store mainly includes m...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/07
CPCG06F11/0766G06F11/079
Inventor 熊晓斌张照猛
Owner 中航金网(北京)电子商务有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products