Connection thread monitoring method and device for connection pool, medium and equipment
A connection pool and thread technology, applied in the computer field, can solve problems such as database downtime, connection pool resource exhaustion, database failure to write information normally, etc., and achieve the effect of improving stability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0069] figure 1 It is a flow chart of the connection thread monitoring method of the connection pool provided in Embodiment 1 of the present application. This embodiment is applicable to the scene of data access to the database through the connection thread in the connection pool. This method can be provided by the embodiment of the present application. The connection thread monitoring device of the connection pool is executed, and the device can be realized by software and / or hardware, and can be integrated into an electronic device for managing the connection pool or managing the database.
[0070] Such as figure 1 As shown, the connection thread monitoring method of the connection pool includes:
[0071] S110, if it is detected that a connection pool management event occurs to a connection thread in the connection pool, determine an event type of the connection pool management event; the event type includes an abnormal number of connection threads or an abnormal connection...
Embodiment 2
[0086] figure 2 It is a flow chart of the connection thread monitoring method of the connection pool provided by Embodiment 2 of the present invention. This embodiment is optimized on the basis of the foregoing embodiments. The specific optimization is: the abnormal number of connection threads includes that the number of connection threads in the connection pool reaches a preset threshold; correspondingly, according to the event type, determining the target connection thread in the connection pool includes: according to the abnormal number of connection threads event type, determine that the target connection thread in the connection pool is all the connection threads in the connection pool; correspondingly, monitor and process the target connection thread according to the processing mode associated with the event type, including: According to the processing method associated with the above event types, all connection threads in the connection pool are initialized.
[0087]...
Embodiment 3
[0109] image 3 It is a flow chart of the connection thread monitoring method of the connection pool provided by Embodiment 3 of the present invention. This embodiment is optimized on the basis of the foregoing embodiments. The specific optimization is: the connection thread state abnormality includes the connection thread in the connection pool being in the state of being disconnected from the database, the establishment time reaching the set life cycle state, or at least one of the state of no data transmission within the preset time length state; correspondingly, according to the event type, determining the target connection thread in the connection pool includes: determining that the target connection thread in the connection pool is a connection thread with an abnormal connection thread state according to the event type of the abnormal state of the connection thread ; Correspondingly, monitoring and processing the target connection thread according to the processing metho...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


