Tanzu - How to monitor number of connections to the CF database
search cancel

Tanzu - How to monitor number of connections to the CF database

book

Article ID: 431726

calendar_today

Updated On:

Products

VMware Tanzu Platform - Cloud Foundry

Issue/Introduction

This KB article describes how to monitor number of connections to the CF database to ensure it does reach database limit.

As mentioned in TAS 10.2 Release Notes there is a database limit -

  • DB Connections - Be careful this does not exceed any Database limit, and note that there are other connections to the CF Database, such as CC workers, Tanzu UAA, Diego etc. 

It's important to make sure environment is staying under limit to avoid connection drops.

Resolution

Thee are Tanzu KPI metrics that report the max and used connections to internal MySQL Database. See KPI documentation.

The metrics of interest are;

  • /mysql/variables/max_connections
  • /p.mysql/net/max_used_connections

Recommended measurement    max_used_connections / max_connections

Recommended alert thresholds    Yellow warning: > 80 % Red critical: > 90 %

For max DB connections, you can also query this value from databse. directly by connecting to TAS database:

Example:

mysql> use ccdb;
Database changed
mysql> SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 3500  |

The number of max connections is tunable in Internal MySQL of Elastic Application Runtime tile.