This document describes how to enable or disable the connection pool feature.
Prerequisites
The database kernel minor version is MySQL 5.7 20211030 or later.
The database kernel minor version is MySQL 8.0 20230630 or later.
Note:
The database proxy connection pool capability has been identified to cause deadlock issues during the 'change user' operation in earlier minor versions of the MySQL kernel. This issue has been rectified in the MySQL 8.0 20230630 minor kernel version. If the minor kernel version of your primary instance has not been updated to MySQL 8.0 20230630, there is a certain level of risk involved. It is recommended to disable the database proxy connection pool capability. If you want to continue utilizing the database proxy connection pool capability, it is advised to upgrade the minor kernel version of your primary instance to MySQL 8.0 20230630 or higher. For instructions on upgrading, please refer to upgrading kernel minor version. Enabling the connection pool feature
1. Log in to the TencentDB for MySQL console, select the region at the top of the page, and click the ID of the target instance to enter the instance management page. 2. On the instance management page, select Database Proxy > Access Policy, find the target access policy, and click Settings.
Note:
You can also find the target access address in Database Proxy > Overview > Connection Address. Then, click Adjust Configurations in the Operation column.
3. In the pop-up window, toggle on Connection Pool Status. Once it is enabled, select Session-Level Connection Pool or Transaction-Level Connection Pool (database proxy kernel version 1.4.1 or later needed), and click OK.
4. After the connection pool feature is enabled, the default connection retention threshold is set to 5 seconds. It is supported to modify this threshold under the Basic Info section, with the modification range being from 1 to 300 seconds. If the connection pool feature is disabled, the connection retention threshold will not be displayed.
Disabling the connection pool feature
1. Log in to the TencentDB for MySQL console, select the region at the top of the page, and click the ID of the target instance to enter the instance management page. 2. On the instance management page, select Database Proxy > Access Policy, find the target access policy, and click Settings.
Note:
You can also find the target access address in Database Proxy > Overview > Connection Address. Then, click Adjust Configurations in the Operation column.
3. In the pop-up window, toggle off Connection Pool Status and click OK.
Was this page helpful?