Aborted clients
Job details
Name: |
Aborted clients |
Platform: |
Mariadb |
Category: |
Availability |
Description: |
Checks the number of clients not closing the connection properly. |
Long description: |
Checks the number of clients not closing the connection properly. |
Version: |
1.1 |
Default schedule: |
12,42 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & is_mariadb_branch=‘1′]/.[hasengine=‘YES’ & use_global_variables_performance_schema = ‘1′ ] |
Parameters
Name |
Default value |
Description |
warning threshold |
50 |
The maximum value of aborted clients (over a period of time defined by the [time threshold] parameter) before a warning is triggered. |
alarm threshold |
500 |
The maximum value of aborted clients (over a period of time defined by the [time threshold] parameter) before an alarm is triggered. |
threshold (time) |
120 |
A period of time (in minutes) which must be passed (combined with the number of aborted clients) before an alarm or a warning is returned by the procedure. |
enable warnings and alarms |
NO |
If set to “NO” (default), the alert will only collect statistics without returning status warning or alarm. Value “YES“ will activate the alert. |
history threshold |
7 |
The maximum number of day to kept statistics for in the historic tables. |
Job Summary
- Purpose: The purpose of this job is to monitor the number of MariaDB clients that have aborted connections and ensure this number remains within acceptable thresholds.
- Why: This job is critical as it helps in identifying issues related to clients not closing their database connections properly, which could lead to resource leaks or performance issues on the database server.
- Manual checking: You can manually check aborted clients in MariaDB using the following SQL command:
select VARIABLE_VALUE as 'Aborted Clients' from performance_schema.global_status where variable_name = 'Aborted_clients';
How It Works
- MariaDB aborted client sessions are periodically checked and recorded.
- The “warning threshold” sets a preliminary alert level, while the “alarm threshold” indicates a more severe issue which needs immediate attention.
- Data on aborted clients is recorded in a history table, allowing for tracking and pattern analysis over a designated period of time. Historical data beyond the specified “history threshold” (in days) is cleaned up to prevent excessive data accumulation.
Automated Procedures
- SQL procedures are implemented to manage data insertion into tables and carry out checks based on dynamic parameters set within the software.
- The system will calculate total and average aborted connections over specified periods and compare these with set thresholds to determine the operational status.
- Depending on the configuration, warnings or alarms are issued based on the threshold settings.
Dependencies and Clean-up
- The strategy includes specific dependencies on tables and stored procedures required for logging and calculating aborted clients.
- Clean-up mechanisms are in place to ensure that the system removes any obsolete or unnecessary data, maintaining efficiency and accuracy.
Reporting and Visualization
- A predefined report template outlines how the aborted client’s data should be represented visually within dbWatch reports.
- Graphs are generated to depict the trends and spikes in aborted connections over time, aiding in visual analysis and decision-making processes.
Technical Implementation
- The stored procedures and their implementations are designed to be robust and handle exceptions gracefully.
- Periodic checks ensure data consistency and validity, confirming that the automated alerts and reports are based on reliable data.
Installation and Compatibility
- This job is automatically installed if conditions related to the server environment and MariaDB configuration are met.
- It supports automatic updates and installation scripts which facilitate maintaining the latest operational logic and security features.
Feature |
Details |
Warning and Alarm Thresholds |
Monitors and reacts to exceeded thresholds for aborted connections |
Historical Analysis |
Maintains history based on configuration, allowing for trend analysis and auditing |
Cleanup Mechanism |
Ensures the system operates efficiently by routinely managing data retention |
Exception Handling |
Robust error handling within procedures to maintain job integrity and reliability |
Visual Reporting |
Graphical representations of data for easy understanding and analysis |
These components ensure that the monitoring job not only alerts on potential issues but also assists in maintaining optimal database performance through preventive insights and actions.