Application troubleshooting method and device, equipment, storage medium and program product
By receiving fault signals and multi-dimensional analysis, combined with application example deployment information, quickly locate faults, solving the problem of low positioning efficiency of application troubleshooting methods in the existing technology, and improving the fault repair efficiency.
Patent Information
- Application Number
- CN202411279763.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-31
AI Technical Summary
The abnormal positioning efficiency of applying troubleshooting methods in the prior art is low, resulting in a long time to repair the fault and a large range of losses and impact. Especially when multiple calls or hardware failures, developers need a lot of time to perform manual analysis.
By receiving the fault signals of the application to be troubleshooted, combining the application instance deployment information obtained in advance, using the encoding framework to monitor the database and generate the fault signal, it is sent asynchronously to the message queue, and performs multi-dimensional analysis to quickly locate faults, including data connections, instances, Analysis of application, deployment unit and site dimensions.
It improves the efficiency of application troubleshooting, reduces the time-consuming of abnormal positioning, quickly identify the operating status of upstream and downstream applications, and reduces the time and loss of fault repair.
Smart Images

Figure CN119226080A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to an application troubleshooting method, device, equipment, storage medium and program product. Background Art
[0002] With the development of information technology, software systems are increasingly widely used. Software systems are prone to failure due to their complexity. Conventional troubleshooting methods rely on error logs, application performance indicators such as operation and hardware, and issue alarms through abnormal judgment algorithms.
[0003] However, when the exception situation is complex, such as involving multiple calls or hardware failures, developers often need a lot of time for manual analysis, which is inefficient and takes a long time to repair, thereby increasing losses and the scope of impact.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide an application troubleshooting method, device, equipment, storage medium and program product, aiming to solve the technical problem of low efficiency of abnormal location in the application troubleshooting method of the prior art.
[0006] To achieve the above objectives, the present application proposes an application troubleshooting method, which is applied to an application troubleshooting system and includes:
[0007] Receiving a fault signal of an application to be troubleshooted;
[0008] Based on the pre-acquired application instance deployment information, troubleshooting is performed according to the fault signal to obtain an application fault troubleshooting result.
[0009] In one embodiment, before the step of receiving the fault signal of the application to be troubleshooted, the method further includes:
[0010] Independently connecting a preset coding framework to a database of the application to be troubleshooted, and monitoring the database through the coding framework;
[0011] If a fault is detected in the database, a fault signal is generated by the coding framework and asynchronously sent to the message queue, and the message queue sends the fault signal to the application troubleshooting system. The fault includes at least one or more of a connection abnormality and a connection blockage.
[0012] In one embodiment, the fault signal at least includes a connection abnormality signal, and after the step of receiving the fault signal of the application to be troubleshooted, the step further includes:
[0013] Writing the connection abnormality signal into a cache, and determining whether the record conclusion of the application instance corresponding to the connection abnormality signal in the cache is recorded for the first time;
[0014] If the recording conclusion is the first recording, determining whether the current log batch number of the connection abnormality signal is continuous with the corresponding previous log batch number;
[0015] If the current log batch number is not continuous with the previous log batch number, determining whether the difference between the current message receiving time of the connection abnormality signal and the corresponding previous message receiving time exceeds a preset time interval threshold;
[0016] If the difference between the current message receiving time and the previous message receiving time does not exceed a preset time interval threshold, the record conclusion of the application instance corresponding to the connection abnormality signal is set as an interval record.
[0017] In one embodiment, the step of performing troubleshooting according to the fault signal based on the pre-acquired application instance deployment information to obtain an application troubleshooting result includes:
[0018] Based on the application instance deployment information, performing a multi-dimensional analysis according to the fault signal to obtain a multi-dimensional analysis result;
[0019] Generate application fault troubleshooting results based on the multi-dimensional analysis results.
[0020] In one embodiment, the fault signal includes at least one or more of a connection abnormality signal and a connection congestion signal, and the multiple dimensions include at least one or more analysis dimensions of a data connection dimension, an instance dimension, an application dimension, a deployment unit dimension, and a site dimension.
[0021] In one embodiment, the connection blocking signal includes at least one or more of instance definition information, log batch number, database connection sequence number, database connection binding sequence number, work thread and execution method, the multi-dimensionality includes data connection dimension, and the step of performing multi-dimensional analysis according to the fault signal based on the application instance deployment information to obtain a multi-dimensional analysis result includes:
[0022] Determine whether the current log batch number of the connection blocking signal in the cache is continuous with the binding sequence number corresponding to the same database connection;
[0023] If the current log batch number of the connection blocking signal is continuous with the same database connection binding sequence number, then obtaining a number of connection blocking signals belonging to the same database connection binding sequence number in the cache;
[0024] According to the working threads and execution methods of the plurality of connection blocking signals, a data connection dimension analysis result is generated, and the data connection dimension analysis result belongs to the multi-dimensional analysis result.
[0025] In addition, to achieve the above objectives, the present application also proposes an application troubleshooting device, the application troubleshooting device comprising:
[0026] A signal receiving module, used for receiving a fault signal of an application to be troubleshooted;
[0027] The fault troubleshooting module is used to perform fault troubleshooting according to the fault signal based on the pre-acquired application instance deployment information to obtain an application fault troubleshooting result.
[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes an application troubleshooting device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application troubleshooting method described above.
[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the application troubleshooting method described above are implemented.
[0030] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the application troubleshooting method described above.
[0031] The present application provides an application troubleshooting method. The present application first receives a fault signal of an application that needs troubleshooting to determine that the application has a fault that needs further troubleshooting; based on the pre-acquired application instance deployment information, the application is troubleshooted according to the received fault signal to obtain an application troubleshooting result, so as to achieve rapid application troubleshooting through the deployment of the application instance, thereby achieving application troubleshooting based on application instance deployment, solving the problem of low efficiency of abnormal location in the prior art application troubleshooting method and improving the efficiency of application troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] Figure 1 A flowchart of the first embodiment of the troubleshooting method for the present application is provided;
[0035] Figure 2 A flowchart of the second embodiment of the troubleshooting method for the present application is provided;
[0036] Figure 3 A schematic diagram of a processing flow of a connection abnormality signal according to a third embodiment of the troubleshooting method of the present application;
[0037] Figure 4 A schematic diagram of a processing flow of a connection blocking signal according to a third embodiment of the troubleshooting method of the present application;
[0038] Figure 5 This is a schematic diagram of the module structure of the troubleshooting device used in the embodiment of the present application;
[0039] Figure 6 A schematic diagram of the device structure of the hardware operating environment involved in the troubleshooting method applied in the embodiment of the present application.
[0040] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0041] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0042] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0043] The main solution of the embodiment of the present application is to receive a fault signal of the application to be troubleshooted; based on the pre-acquired application instance deployment information, perform troubleshooting according to the fault signal to obtain an application fault troubleshooting result.
[0044] Technical terms involved in this application:
[0045] Application: usually refers to a complete set of software systems or solutions that meet user needs. It can be desktop applications, mobile applications, web applications, embedded systems, etc. Applications are designed to provide certain functions or services, such as document processing, image editing, online shopping, etc. Applications usually include one or more application programs and may contain multiple functional modules or components.
[0046] Application: Usually refers to the actual software program that performs a specific task or function. It is the specific implementation of the application and a collection of executable code. The application is the core part of the application and is the object that users interact directly with.
[0047] Application instance: refers to a specific running version of an application in a specific environment. Each application instance usually has its own configuration and data and runs independently. An application instance is a specific manifestation of an application, usually involving aspects such as environment configuration, data isolation, and state management.
[0048] Kafka: is an open source stream processing platform, widely used for real-time data stream processing and analysis. It uses a publish-subscribe model to process messages. Producers publish messages to topics, and consumers subscribe to topics to receive messages.
[0049] AZ (Available Zone): is a logical concept and a fault isolation domain. An AZ may contain multiple DCs, and a DC can also have multiple AZs.
[0050] DC (Data Center): is a physical concept, referring to a collection of servers, networks, storage and other equipment in a physical space (such as a computer room) to achieve centralized processing, storage, transmission, exchange and management of information.
[0051] Redis: is an open source memory data structure storage system, often used as a database, cache and message middleware.
[0052] Conventional application troubleshooting methods in the prior art mostly collect error logs, operating performance, hardware performance and other indicators of application instances, and then issue abnormal alarms for abnormal application operating conditions through a series of abnormality determination algorithms. These methods only issue alarms for application abnormalities, and the root causes of the abnormalities still need to be manually analyzed and located by developers.
[0053] After receiving an alert, developers usually need to manually analyze and locate the exception based on the error information. They need to manually check a large number of exception logs and analyze them one by one based on various performance indicators of the application instance. When the exception scenario is more complex, such as involving multiple upstream and downstream calls, large-scale exceptions caused by underlying hardware failures (databases, physical machines, networks, etc.), and dependent component exceptions, developers often need to spend a lot of time to locate the specific program method that caused the exception and find the root cause of the exception. This process is time-consuming, labor-intensive, and inefficient. The longer it takes to repair the exception, the greater the loss and impact.
[0054] This application receives communication access exception data between applications through a framework, forms an application call link relationship, and collects database exception connection and connection timeout information. When an application exception occurs, the troubleshooting system receives the exception signal and analyzes the impact of the exception from multiple dimensions such as database deployment units, instance deployment sites, and application running versions in combination with the application instance deployment architecture. It quickly makes an exception determination and locates the specific program method and SQL execution stage of the application instance. It can quickly identify the running status of upstream and downstream applications when locating application troubleshooting exceptions, reduce the time spent on exception locating, and improve the efficiency of application troubleshooting.
[0055] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an application troubleshooting device, etc. The following takes the application troubleshooting device as an example to illustrate this embodiment and the following embodiments.
[0056] Based on this, the present application embodiment provides an application troubleshooting method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the troubleshooting method used in this application.
[0057] In this embodiment, the application troubleshooting method includes steps S10 to S20:
[0058] Step S10, receiving a fault signal of the application to be troubleshooted;
[0059] It should be noted that the application to be troubleshooted refers to the application that has a fault and needs to be troubleshooted. An application to be troubleshooted usually has multiple application instances. The fault signal refers to the identifier or message of the error or abnormality reported by the application or system, which contains the necessary information required for troubleshooting, such as the name of the application that has a fault, the name of the application instance, etc.
[0060] It is understandable that due to the complexity of the software system itself, various faults may occur during operation. When a fault occurs during application operation, the application itself or the system that monitors the application operation will send a fault signal to indicate that there is a problem or abnormality with the application.
[0061] Step S20: based on the pre-acquired application instance deployment information, troubleshooting is performed according to the fault signal to obtain an application fault troubleshooting result.
[0062] It should be noted that application instance deployment information refers to the specific deployment information of application instances such as configuration, status, and database related to the application to be troubleshooted in a specific environment, providing application operation information and application instance architecture information for troubleshooting, so that troubleshooting can quickly locate the root cause of the anomaly and thus solve the application failure. Troubleshooting results refer to the specific cause or related information of the failure obtained by analyzing the fault signal and application instance deployment information, which helps determine the root cause of the problem and guides the repair work.
[0063] It is understandable that by combining the fault signal with the deployment information of the application instance, the cause of the fault can be analyzed more systematically and the troubleshooting results can be obtained, which helps to locate the abnormality of the application fault and solve the abnormal problems that occur in the application.
[0064] In a feasible implementation manner, before the step of receiving the fault signal of the application to be troubleshooted, the step further includes:
[0065] Step S101, independently connecting a preset coding framework to a database of the application to be troubleshooted, and monitoring the database through the coding framework;
[0066] It should be noted that the coding framework refers to an independent coding framework introduced between the database and the entire application system, which is used to monitor the status of the database in real time. Database independent connection refers to a database connection method that is independent of the database and the database connection pool of the application to be troubleshooted, which can independently monitor the status of the database even if there is a problem with the application.
[0067] It is understandable that in order to ensure that the status of the database can be monitored in a timely manner and potential database problems such as connection anomalies or blockages can be discovered early, an independently connected coding framework is introduced between the database and the application to be troubleshooted. The database status is monitored in real time through the framework. During database operations, the database health status and performance indicators can be collected and recorded in real time.
[0068] Step S102, if it is detected that the database has a fault, a fault signal is generated through the coding framework and asynchronously sent to the message queue, and the message queue sends the fault signal to the application troubleshooting system. The fault includes at least one or more of a connection abnormality and a connection blockage.
[0069] It is understandable that when the coding framework detects a database failure, it will generate a fault signal and send it to the message queue. The message queue is responsible for passing the signal to the troubleshooting system. Through asynchronous processing of the message queue, the fault information is promptly passed to the troubleshooting system to achieve rapid response and processing of application failures.
[0070] In this implementation, an independent monitoring framework and an asynchronous message queue are used to ensure that fault information is quickly and efficiently transmitted to the troubleshooting system, separating the monitoring and troubleshooting functions, reducing the coupling between systems, and improving the overall stability of the system.
[0071] In a feasible implementation manner, the fault signal at least includes a connection abnormality signal, and after the step of receiving the fault signal of the application to be troubleshooted, the step further includes:
[0072] Step S103, writing the connection abnormality signal into a cache, and determining whether the record conclusion of the application instance corresponding to the connection abnormality signal in the cache is recorded for the first time;
[0073] It can be understood that the monitored connection exception signal is written into the cache, and by judging whether the connection exception signal in the cache is the first record of the corresponding application instance, it is determined whether the connection exception occurs for the first time, thereby deciding whether the record in the cache needs to be further processed, avoiding repeated processing of recorded exceptions, and optimizing the fault response process.
[0074] Step S104, if the recording conclusion is the first recording, determining whether the current log batch number of the connection abnormality signal is continuous with the corresponding previous log batch number;
[0075] It should be noted that the log batch number may refer to the serial number of the log batch generated by the encoding framework to monitor database anomalies, or may refer to the serial number of the database operation log batch, and the log batch number is included in the connection anomaly signal.
[0076] It is understandable that if the connection exception signal is the first record of the corresponding application instance, check whether the log batch number of the currently received connection exception signal is continuous with the previous batch number to ensure the continuity of the log record, so as to accurately perform fault analysis and time series processing.
[0077] Step S105, if the current log batch number is not continuous with the previous log batch number, determining whether the difference between the current message receiving time of the connection abnormality signal and the corresponding previous message receiving time exceeds a preset time interval threshold;
[0078] It can be understood that when the log batch number is discontinuous, it is checked whether the interval between the time when the current connection exception signal message is received and the corresponding time when the connection exception signal message was received last exceeds the preset threshold, and it is determined whether the abnormal signal causes the logs sent by the framework monitoring to be discontinuous due to the long time interval, so as to judge whether the records in the cache need to be further processed.
[0079] Step S106: If the difference between the current message receiving time and the previous message receiving time does not exceed a preset time interval threshold, the record conclusion of the application instance corresponding to the connection abnormality signal is set as an interval record.
[0080] It is understandable that if the time interval is normal, the record conclusion of the application instance corresponding to the connection exception signal in the cache will be marked as "gap", indicating that the current connection exception signal is a gap record of the abnormal connection of the application rather than the first abnormal record, which helps the system distinguish between the first failure and the continuous failure when handling the exception, so as to optimize the fault handling strategy.
[0081] In this embodiment, by caching and recording abnormal signals and checking batch numbers and time intervals, combined with a record conclusion update strategy, the first fault and persistent fault are distinguished and efficiently recorded, thereby improving the efficiency and stability of troubleshooting.
[0082] The present embodiment provides an application troubleshooting method, which first receives a fault signal of an application that needs troubleshooting to determine whether the application has a fault that needs further troubleshooting; based on the pre-acquired application instance deployment information, the application is troubleshooted according to the received fault signal to obtain an application troubleshooting result, so as to achieve rapid application troubleshooting based on the deployment status of the application instance, thereby achieving application troubleshooting based on application instance deployment, solving the problem of low efficiency of abnormal location in the prior art application troubleshooting method, and improving the efficiency of application troubleshooting.
[0083] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can refer to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2 This is a flow chart of the second embodiment of the troubleshooting method used in this application.
[0084] In this embodiment, the step of performing troubleshooting based on the fault signal based on the pre-acquired application instance deployment information to obtain an application troubleshooting result includes:
[0085] Step S201, based on the application instance deployment information, performing a multi-dimensional analysis according to the fault signal to obtain a multi-dimensional analysis result;
[0086] It should be noted that multi-dimensional analysis refers to the analysis of various dimensions based on the application instance deployment information and fault signals of the application to be troubleshooted. The results of the multi-dimensional analysis include identifying the root cause of the fault and its possible influencing factors, such as the specific cause of the fault, the affected components, and the recommended repair measures.
[0087] It is understandable that by comprehensively considering the deployment information of the application instance and various dimensions of the fault signal (such as system performance, network status, resource usage, etc.), an in-depth analysis can be performed to fully understand the context and impact range of the fault, helping to identify the root cause of the fault and its possible influencing factors.
[0088] Step S202: Generate application fault troubleshooting results based on the multi-dimensional analysis results.
[0089] It should be noted that application troubleshooting results may include the specific cause of the failure, the affected components, and the recommended repair measures.
[0090] It can be understood that according to the results of multi-dimensional analysis, combined with known failure modes and troubleshooting rules, the final troubleshooting results are formed, providing efficient and clear troubleshooting conclusions, so that further repair measures can be taken to restore the normal operation of the system.
[0091] In a feasible implementation manner, the fault signal includes at least one or more of a connection abnormality signal and a connection congestion signal, and the multiple dimensions include at least one or more analysis dimensions of a data connection dimension, an instance dimension, an application dimension, a deployment unit dimension, and a site dimension.
[0092] It is understandable that fault signals may include connection anomaly signals and connection congestion signals. Multi-dimensional analysis may cover multiple dimensions such as data connection, instance, application, deployment unit, and site. Among them, this multi-dimensional analysis method has different dimensions that influence each other and progress layer by layer, which can more comprehensively identify the cause of the fault and take into account various potential influencing factors. Specifically, connection anomaly signals may indicate application or database configuration problems, while connection congestion signals may be related to system resources or loads. By combining analysis in different dimensions, problems can be located and solved more accurately.
[0093] For example, the analysis results of the data connection dimension can be used as the basis for the analysis of the instance dimension, affecting the analysis results of the instance dimension. The analysis results of the instance dimension can be used as the basis for the analysis of the application dimension, thereby affecting the analysis results of the application dimension. This process is progressive, thus ultimately obtaining multi-dimensional analysis results, which can more comprehensively identify the cause of the fault, take into account various potential influencing factors, and provide comprehensive and accurate application fault troubleshooting results.
[0094] In a feasible implementation manner, the connection blocking signal includes at least one or more of instance definition information, log batch number, database connection sequence number, database connection binding sequence number, work thread and execution method, the multi-dimensionality includes a data connection dimension, and the step of performing a multi-dimensional analysis based on the fault signal based on the application instance deployment information to obtain a multi-dimensional analysis result includes:
[0095] Step S2011, determining whether the current log batch number of the connection blocking signal in the cache is a continuous number of binding sequences corresponding to the same database connection;
[0096] It should be noted that the log batch number refers to the log batch number used to record application failures. The database connection binding number refers to the binding number of the program and the database connection. The working thread refers to the thread that the program executes when the connection is blocked. The execution method refers to the method, statement, etc. that is being executed when the connection is blocked.
[0097] It can be understood that it is necessary to determine whether the log batch numbers of the connection congestion signals of the same database connection binding number are continuous in the cache, that is, to determine whether the current connection congestion signal monitored by the program with the same database connection in the cache is continuous with the log batch number of the previously recorded connection congestion signal, so as to verify whether the connection congestion signal is recorded in ascending order, and then determine whether there is any abnormality in the data connection of the current program.
[0098] Step S2012, if the current log batch number of the connection blocking signal is continuous with the same database connection binding sequence number, then a plurality of connection blocking signals belonging to the same database connection binding sequence number in the cache are obtained;
[0099] It can be understood that if the program with the same database connection in the cache detects that the log batch number of the current connection congestion signal and the previously recorded connection congestion signal are continuous, several connection congestion signals belonging to the same database connection binding number in the cache are obtained, that is, all abnormal records of database connection congestion when the same program in the cache is connected to the same database are obtained.
[0100] Step S2013: Generate data connection dimension analysis results according to the working threads and execution methods of the plurality of connection blocking signals, wherein the data connection dimension analysis results belong to the multi-dimensional analysis results.
[0101] It is understandable that the work threads and method statements executed when the database connection is blocked when the same program is connected to the same database are combined to further determine whether there is an exception, and generate analysis results of application troubleshooting in the data connection dimension.
[0102] In this implementation, multiple historical connection congestion signals are obtained through connection congestion signals of continuous log batch numbers, and data connection dimension analysis is performed based on the working threads and execution methods of the multiple historical connection congestion signals to determine the root cause of the connection congestion, providing a basis for further optimization or repair.
[0103] In this embodiment, a comprehensive analysis is performed in combination with different aspects of the fault signal and the application instance to fully understand the potential causes and impact range of the fault, help developers quickly locate and solve application fault problems, simplify the troubleshooting process, and improve the efficiency of application troubleshooting.
[0104] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments mentioned above can be referred to the above introduction and will not be repeated later.
[0105] Exemplarily, the application troubleshooting method may include steps 1 to 5:
[0106] Step 1: The coding framework detects the database through an independent database connection. If the database is abnormal, the fault signal is asynchronously sent to the Kafka message queue, where the main information is as follows:
[0107] Fields Field meaning Remark logBatchNo This log batch number The count starts from 1 every day. errorType Individual connection detection failure types createConnFail / selectFail connCreateTime The timestamp of the creation of the individual connection dbName The name of the database in this instance appName The name of the application that issued the alarm (this application name) deploymentNo The instance deployment number that issued the alarm
[0108] Step 2: The framework monitors the time taken to use the database connection. When the time taken exceeds 3s, it considers the connection blocked and sends a blocking signal to Kafka asynchronously. The blocking signal contains information such as instance definition information, database connection serial number, database connection binding serial number, current working thread, and current execution method. The main information is as follows:
[0109]
[0110] Step 3: The troubleshooting system (hereinafter referred to as ZWI) consumes the connection abnormality signal and connection congestion signal sent by the framework from the Kafka message queue, writes them into the Redis cache, and processes the original signal.
[0111] like Figure 3 As shown, Figure 3 The following is a schematic diagram of a process flow for processing a connection abnormality signal according to the third embodiment of the troubleshooting method of the present application, specifically including:
[0112] 1. Check whether the conclusion is the first time:
[0113] If it is the first time, check whether the log batch number of the currently received signal message is continuous with the log batch number of the last received message.
[0114] If it is continuous, the number of consecutive records will be increased by one.
[0115] If it is not continuous, the record resets the continuous count to 1.
[0116] 2. Check the time difference between the message received in the current log batch and the message in the previous log batch:
[0117] If the time difference is not less than 20 time units, the update record conclusion is a gap.
[0118] If the time difference is less than 20 time units, the record is asynchronously put into the historical data queue, and the record conclusion is updated to be the first time as a new record.
[0119] like Figure 4 As shown, Figure 4 The following is a schematic diagram of a processing flow of a connection blocking signal according to the third embodiment of the troubleshooting method of the present application, which specifically includes:
[0120] 1. Scheduled 5-second scan: Scheduled triggering of the scanning process.
[0121] 2. Get records from Redis: Get records from Redis based on the application.
[0122] 3. Check the occupied status: If the current application is in the occupied state, and the difference between the time unit of the current message and the time unit of the latest message in the record is greater than 1 (the set threshold), the update status is released, the judgment conclusion is filled in, and the expiration time is reset to 1 hour.
[0123] 4. Incrementally update the TDSQL database.
[0124] 5. If there are no abnormalities in all instances of the application for 20 time units, delete the current table data (set the Redis expiration time to 0) and insert the table data into the asynchronous historical data.
[0125] 6. Update the application diagnostic data and set the current bitmap (field value) to N. If all are N, delete the record.
[0126] 7. Delete the application diagnostic list Redis.
[0127] Step 4: The scheduled task scans the data in Redis and analyzes it from the dimensions of data connection, instance, application, deployment unit, site, etc., combined with the application instance deployment information. Here, the field connId+bindSeq is regarded as the unique key for a program to bind a data connection. Specifically:
[0128] 1. Data connection dimension:
[0129] According to the log batch number of the fault signal, determine whether the connection is released. If the log batch number in the received blocking signal is not continuous for the same bound connection, it means that the data connection has been bound by other programs and the previous program binding connection has been released. If the log batch number is continuous, record the execution program, method, execution statement and other information in each connection timeout signal. When the connection is released, determine the root cause of the connection blockage based on the recorded information, including the execution program, method, SQL execution stage, and execution statement type at the time of blockage. And determine whether the blockage is caused by a single method or a single operation.
[0130] 2. Instance dimensions:
[0131] Scan the data in the data connection dimension and determine the current status of the data connection based on the current database connection usage of the instance.
[0132] If (current data connection - number of occupied connections - current) / (data connection - maximum configuration) > blocking threshold, the data connection status is blocked, otherwise it is normal.
[0133] The scheduled task scans once every time unit (10s). If the number of consecutive blocked times of the data connection status exceeds the threshold, the instance status is judged to be blocked; if the number of consecutive normal times of the data connection status exceeds the threshold, the instance status is judged to be normal; in other cases, the instance status is judged to be jittery.
[0134] 3. Application dimension:
[0135] Combined with instance data, determine whether jitter and congestion instances have different application versions, and thus determine whether the anomaly is caused by version upgrade;
[0136] Determine whether the application blocking is caused by a certain program processing. If so, determine whether the application is blocked by a single program processing, and locate the specific program method and the longest freezing time.
[0137] 4. Deployment unit dimension:
[0138] Based on the application database and application instance deployment, determine whether the instance congestion is caused by database abnormalities, and calculate the loss ratio of each database deployment unit.
[0139] 5. Site Dimensions:
[0140] Based on the deployment region and site conditions of the application instance, calculate the loss ratio of each site to provide a basis for troubleshooting whether the anomaly is caused by an AZ (Available Zone) failure or network failure.
[0141] Step 5: Display application troubleshooting information
[0142] Exemplarily, the result of application troubleshooting specifically includes the following information:
[0143] The FPMA application started receiving data connection occupation timeout signals at 2024-05-1617:52:30, and has received 16 connection occupation timeout signals so far.
[0144] 1. In terms of instance distribution, 5 application instances provide services to the outside world (non-isolated), of which 0 application instances are continuously blocked, 2 application instances are intermittently blocked, and 3 application instances are working normally; 0 application instances are actively blown by the framework; the business support capability is lost by 20%, and there is no comprehensive application-level failure. It is recommended to notify the office manager (reporting path: application person in charge → team leader → office manager).
[0145] 2. In terms of data distribution, the application instance that issued the data connection occupation timeout signal is distributed in one sub-database. Currently, one sub-database is still working normally: the data support capability has been lost by 50%, and there is no comprehensive failure at the application level. It is recommended to notify the team supervisor (reporting path: application manager → team leader → office manager → team supervisor).
[0146] 3. Analyzing from the perspective of sub-databases, no abnormal signal of sub-database access has been received so far, and the failure has been preliminarily ruled out as a result of abnormal sub-database access.
[0147] 4. From the program dimension analysis, 100% of the business request processing is stuck in the invokeslowsq program com.cmbfpm.servicesSowsqletService.sleplest method, and the longest stuck time is 10 seconds; the stuck link is executing SQL query statements, and the data connection is occupied for a long time due to slow processing, resulting in blockage. At present, no error signal for the critical path of data access has been received. It is recommended to analyze the program processing logic and contact the database administrator to analyze whether the execution plan is reasonable.
[0148] Application name: FPMA: FTC application troubleshooting test application, current time unit (10 seconds refresh): 2024-05-1617:53:30→2024-05-1617:53:40. Among them, 0 application instances are continuously blocked, 2 application instances are intermittently blocked, and 3 application instances are working normally.
[0149]
[0150] ①Operation tips:
[0151] 1. Only the connection congestion of the service instances provided to the outside world is displayed.
[0152] 2. Deployment unit status:
[0153] When all instances under the sub-database are blocked, the deployment unit status is judged to be completely blocked;
[0154] When there is no normal instance under the sub-database, the deployment unit status is judged to be completely blocked;
[0155] When not all instances in a sub-database are normal, the deployment unit status is judged to be partially blocked;
[0156] When all instances under the sub-database are normal, the deployment unit status is judged to be all normal.
[0157] 3. Conclusion of application example evaluation:
[0158] When data connection-continuous times-blockage is greater than
[10] , the application instance evaluation conclusion is judged to be in a blocked state;
[0159] When data connection-continuous times-normal is greater than [1], the application instance evaluation conclusion is judged to be in a normal state, otherwise the application instance evaluation conclusion is judged to be in a jitter state.
[0160] In this embodiment, first, a fault signal of an application that needs troubleshooting is received to determine whether the application has a fault that needs further troubleshooting; based on the pre-acquired application instance deployment information, the application is troubleshooted according to the received fault signal to obtain an application fault troubleshooting result, so as to achieve rapid application fault troubleshooting based on the deployment status of the application instance, thereby realizing application fault troubleshooting based on application instance deployment, solving the problem of low efficiency of abnormal location in prior art application troubleshooting methods, and improving the efficiency of application fault troubleshooting.
[0161] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the troubleshooting method used in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0162] This application also provides an application troubleshooting device, please refer to Figure 5 , the application troubleshooting device comprises:
[0163] A signal receiving module 10, used to receive a fault signal of an application to be troubleshooted;
[0164] The fault troubleshooting module 20 is used to perform fault troubleshooting according to the fault signal based on the pre-acquired application instance deployment information to obtain an application fault troubleshooting result.
[0165] Optionally, the signal receiving module 10 is further used for:
[0166] Independently connecting a preset coding framework to a database of the application to be troubleshooted, and monitoring the database through the coding framework;
[0167] If a fault is detected in the database, a fault signal is generated by the coding framework and asynchronously sent to the message queue, and the message queue sends the fault signal to the application troubleshooting system. The fault includes at least one or more of a connection abnormality and a connection blockage.
[0168] Optionally, the signal receiving module 10 is further used for:
[0169] Writing the connection abnormality signal into a cache, and determining whether the record conclusion of the application instance corresponding to the connection abnormality signal in the cache is recorded for the first time;
[0170] If the recording conclusion is the first recording, determining whether the current log batch number of the connection abnormality signal is continuous with the corresponding previous log batch number;
[0171] If the current log batch number is not continuous with the previous log batch number, determining whether the difference between the current message receiving time of the connection abnormality signal and the corresponding previous message receiving time exceeds a preset time interval threshold;
[0172] If the difference between the current message receiving time and the previous message receiving time does not exceed a preset time interval threshold, the record conclusion of the application instance corresponding to the connection abnormality signal is set as an interval record.
[0173] Optionally, the fault troubleshooting module 20 is further used to:
[0174] Based on the application instance deployment information, performing a multi-dimensional analysis according to the fault signal to obtain a multi-dimensional analysis result;
[0175] Generate application fault troubleshooting results based on the multi-dimensional analysis results.
[0176] Optionally, the fault signal includes at least one or more of a connection abnormality signal and a connection congestion signal, and the multiple dimensions include at least one or more analysis dimensions of a data connection dimension, an instance dimension, an application dimension, a deployment unit dimension and a site dimension.
[0177] Optionally, the connection blocking signal includes at least one or more of instance definition information, log batch number, database connection sequence number, database connection binding sequence number, work thread and execution method, the multiple dimensions include data connection dimension, and the troubleshooting module 20 is further used to:
[0178] Determine whether the current log batch number of the connection blocking signal in the cache is continuous with the binding sequence number corresponding to the same database connection;
[0179] If the current log batch number of the connection blocking signal is continuous with the same database connection binding sequence number, then obtaining a number of connection blocking signals belonging to the same database connection binding sequence number in the cache;
[0180] According to the working threads and execution methods of the plurality of connection blocking signals, a data connection dimension analysis result is generated, and the data connection dimension analysis result belongs to the multi-dimensional analysis result.
[0181] The application troubleshooting device provided by the present application adopts the application troubleshooting method in the above embodiment, which can solve the technical problem of low abnormal location efficiency of the application troubleshooting method in the prior art. Compared with the prior art, the beneficial effects of the application troubleshooting device provided by the present application are the same as the beneficial effects of the application troubleshooting method provided by the above embodiment, and other technical features in the application troubleshooting device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0182] The present application provides an application troubleshooting device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the application troubleshooting method in the first embodiment described above.
[0183] Reference below Figure 6 , which shows a schematic diagram of the structure of an application troubleshooting device suitable for implementing the embodiment of the present application. The application troubleshooting device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The application troubleshooting device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0184] like Figure 6As shown, the application troubleshooting device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the application troubleshooting device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the application troubleshooting device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an application troubleshooting device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0185] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0186] The application troubleshooting device provided by the present application adopts the application troubleshooting method in the above embodiment, which can solve the technical problem of low abnormal location efficiency of the application troubleshooting method in the prior art. Compared with the prior art, the beneficial effects of the application troubleshooting device provided by the present application are the same as the beneficial effects of the application troubleshooting method provided by the above embodiment, and the other technical features in the application troubleshooting device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0187] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0188] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0189] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the application troubleshooting method in the above-mentioned embodiment.
[0190] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0191] The computer-readable storage medium may be included in the application troubleshooting device; or may exist independently without being assembled into the application troubleshooting device.
[0192] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the application troubleshooting device, the application troubleshooting device: receives the fault signal of the application to be troubleshooted; based on the pre-acquired application instance deployment information, performs troubleshooting according to the fault signal to obtain the application troubleshooting result.
[0193] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0194] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0195] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0196] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned application troubleshooting method, and can solve the technical problem of low efficiency of abnormal location in the application troubleshooting method of the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the application troubleshooting method provided by the above-mentioned embodiment, and will not be repeated here.
[0197] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned application troubleshooting method when executed by a processor.
[0198] The computer program product provided by the present application can solve the technical problem of low efficiency of abnormal location in the prior art application troubleshooting method. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the application troubleshooting method provided by the above embodiment, which will not be elaborated here.
[0199] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An application troubleshooting method, characterized in that: The method is applied to an application troubleshooting system, and includes: Receiving a fault signal of an application to be troubleshooted; Based on the pre-acquired application instance deployment information, troubleshooting is performed according to the fault signal to obtain an application fault troubleshooting result.
2. The method according to claim 1, characterized in that: Before the step of receiving the fault signal of the application to be troubleshooted, the method further includes: Independently connecting a preset coding framework to a database of the application to be troubleshooted, and monitoring the database through the coding framework; If a fault is detected in the database, a fault signal is generated by the coding framework and asynchronously sent to the message queue, and the message queue sends the fault signal to the application troubleshooting system. The fault includes at least one or more of a connection abnormality and a connection blockage.
3. The method according to claim 1, characterized in that: The fault signal at least includes a connection abnormality signal. After the step of receiving the fault signal of the application to be troubleshooted, the step further includes: Writing the connection abnormality signal into a cache, and determining whether the record conclusion of the application instance corresponding to the connection abnormality signal in the cache is recorded for the first time; If the recording conclusion is the first recording, determining whether the current log batch number of the connection abnormality signal is continuous with the corresponding previous log batch number; If the current log batch number is not continuous with the previous log batch number, determining whether the difference between the current message receiving time of the connection abnormality signal and the corresponding previous message receiving time exceeds a preset time interval threshold; If the difference between the current message receiving time and the previous message receiving time does not exceed a preset time interval threshold, the record conclusion of the application instance corresponding to the connection abnormality signal is set as an interval record.
4. The method according to claim 1, characterized in that: The step of performing troubleshooting based on the pre-acquired application instance deployment information and the fault signal to obtain an application fault troubleshooting result comprises: Based on the application instance deployment information, performing a multi-dimensional analysis according to the fault signal to obtain a multi-dimensional analysis result; Generate application fault troubleshooting results based on the multi-dimensional analysis results.
5. The method according to claim 4, characterized in that: The fault signal includes at least one or more of a connection abnormality signal and a connection congestion signal, and the multiple dimensions include at least one or more analysis dimensions of a data connection dimension, an instance dimension, an application dimension, a deployment unit dimension, and a site dimension.
6. The method according to any one of claims 3 to 5, characterized in that: The connection blocking signal includes at least one or more of instance definition information, log batch number, database connection sequence number, database connection binding sequence number, work thread and execution method, the multi-dimensionality includes data connection dimension, and the step of performing multi-dimensional analysis according to the fault signal based on the application instance deployment information to obtain a multi-dimensional analysis result includes: Determine whether the current log batch number of the connection blocking signal in the cache is continuous with the binding sequence number corresponding to the same database connection; If the current log batch number of the connection blocking signal is continuous with the same database connection binding sequence number, then obtaining a number of connection blocking signals belonging to the same database connection binding sequence number in the cache; According to the working threads and execution methods of the plurality of connection blocking signals, a data connection dimension analysis result is generated, and the data connection dimension analysis result belongs to the multi-dimensional analysis result.
7. An application troubleshooting device, characterized in that: The device comprises: A signal receiving module, used for receiving a fault signal of an application to be troubleshooted; The fault troubleshooting module is used to perform fault troubleshooting according to the fault signal based on the pre-acquired application instance deployment information to obtain an application fault troubleshooting result.
8. An application troubleshooting device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application troubleshooting method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the application troubleshooting method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the application troubleshooting method according to any one of claims 1 to 6 are implemented.
