Description
This alert is triggered when the proportion of tenant connections exceeds the threshold.
The proportion of tenant connections = The number of connections between OBProxy and OBServer used by the tenant/The total number of connections of all units allocated to the tenant in the current primary zone
Alert information
| Trigger method | Alert level | Scope |
|---|---|---|
| Based on the expression of the metric | Warning | Tenant |
Alert rule
| Metric | Default threshold | Source | Duration | Detection cycle | Elimination cycle |
|---|---|---|---|---|---|
| ob_tenant_host_connection_percent | 95 | Internal tables __all_unit_config and __all_virtual_processlist of OceanBase Database | 0 seconds | 60 seconds | 5 minutes |
Alert templates
Overview: ${alarm_target} ${alarm_name}
Details: ${alarm_target} ${alarm_name} The proportion of used connections is ${value}%, exceeding the threshold of ${alarm_threshold}%.
Overview example: ob_cluster=C1-1000:tenant_name=tenant-1:svr_ip=xxx.xxx.xxx.xxx Excessive proportion of connections used by the OceanBase Database tenant
Details example: ob_cluster=C1-1000:tenant_name=tenant-1:svr_ip=xxx.xxx.xxx.xxx Excessive proportion of connections used by the OceanBase tenant The proportion of connections used by the OceanBase tenant reaches 96.0%, exceeding the threshold of 95.0%.
Impact on the system
This issue has no impact on the system. At present, OceanBase does not limit the establishment of connections when the number of sessions exceeds the unit specification. This alert is triggered to remind the administrator that too many connections have been used.
Possible causes
This issue is commonly found when the resource plan of a tenant cannot cope with the business requirements or hotspot data is generated.
Suggested solutions
For expected application connections, use the following syntax to modify the unit specification and reconfigure the number of sessions allowed to meet the application requirements, so as to prevent this alert from being frequently triggered.
-- This example shows how to modify the unit specification of the tenant tester. SET @TENANT_NAME='tester'; -- View the unit specification of the tenant tester. SELECT t.tenant_name, c.unit_config_id, c.`name` AS unit_name, c.max_session_num FROM __all_resource_pool p JOIN __all_unit_config c ON p.unit_config_id=c.unit_config_id JOIN __all_tenant t ON p.tenant_id=t.tenant_id WHERE t.tenant_name=@TENANT_NAME; -- Sample response. The value of the max_session_num parameter here is 1000. +-------------+----------------+-------------+-----------------+ | tenant_name | unit_config_id | unit_name | max_session_num | +-------------+----------------+-------------+-----------------+ | tester | 1054 | tester_unit | 1000 | +-------------+----------------+-------------+-----------------+ -- Run this command to change the value of the max_session_num parameter to 2000. ALTER RESOURCE UNIT tester_unit max_session_num 2000; -- Check whether the modification takes effect. SELECT tenant_name, unit_id, svr_ip, max_session_num FROM gv$unit WHERE tenant_name=@TENANT_NAME; -- Sample response. +-------------+---------+----------------+-----------------+ | tenant_name | unit_id | svr_ip | max_session_num | +-------------+---------+----------------+-----------------+ | tester | 1080 | xxx.xxx.xxx.1 | 2000 | | tester | 1079 | xxx.xxx.xxx.2 | 2000 | | tester | 1078 | xxx.xxx.xxx.3 | 2000 | +-------------+---------+----------------+-----------------+For unexpected application connections, contact the application owner to troubleshoot the connections.
You can perform the following steps to view sessions :
Log on to the OceanBase Cloud Platform (OCP) console, and click Tenants in the left-side navigation pane.
Click the target tenant on the tenant list to enter the Tenant Overview page.
In the left-side navigation pane, click Sessions and view Tenant Session and Session Statistics .