-
Product Bulletin
- Vulnerability Notice
-
Product Notices
- [Offline Notice] RDS for PostgreSQL 12 Will Go Offline on November 1, 2025, 00:00:00 GMT+08:00
- [Notice] Adjustment on the EOS Date of Huawei Cloud RDS for MySQL 5.7
- [Product Discontinuation Notice] RDS for PostgreSQL 12 Will Be Discontinued on May 1, 2025, 00:00:00 GMT+08:00
- [Offline Notice] RDS for PostgreSQL 10 and 11 Will Go Offline on November 1, 2024, 00:00:00 GMT+08:00
- [Product Discontinuation Notice] RDS for MySQL 5.6 Will Be Discontinued on July 1, 2024, 00:00:00 GMT+08:00
- [Product Discontinuation Notice] RDS for PostgreSQL 10 and 11 Will Be Discontinued on July 1, 2024, 00:00:00 GMT+08:00
- [Offline Notice] RDS for PostgreSQL 9.5 and 9.6 Will Go Offline on July 1, 2024, 00:00:00 GMT+08:00
- [Notice] OBT for Memory Acceleration of RDS for MySQL Starts from May 28, 2024
- Product Release Notes
- Service Overview
- Billing
- Getting Started
-
User Guide
- Suggestions on Using RDS for MariaDB
- Instance Connection
-
Performance Tuning
- What Is the Maximum Number of IOPS Supported by RDS?
- How Do I Improve the Query Speed of My RDS Database?
- Identifying Why CPU Usage of RDS for MariaDB Instances Is High and Providing Solutions
- RDS for MariaDB Memory Usage Too High
- What Should I Do If an RDS DB Instance Is Abnormal Due to Full Storage Space?
- Troubleshooting Slow SQL Issues for RDS for MariaDB Instances
- Permissions Management
- Instance Lifecycle
-
Instance Modifications
- Upgrading a Minor Version
- Changing a DB Instance Name
- Changing a DB Instance Description
- Changing the Replication Mode
- Changing the Failover Priority
- Changing a DB Instance Class
- Scaling Up Storage Space
- Storage Autoscaling
- Manually Switching Between Primary and Standby DB Instances
- Changing the Maintenance Window
- Read Replicas
- Data Backups
- Data Restorations
-
Parameter Templates
- Creating a Parameter Template
- Modifying RDS for MariaDB Instance Parameters
- Exporting a Parameter Template
- Importing a Parameter Template
- Comparing Parameter Templates
- Viewing Parameter Change History
- Replicating a Parameter Template
- Resetting a Parameter Template
- Applying a Parameter Template
- Viewing Application Records of a Parameter Template
- Modifying a Parameter Template Description
- Deleting a Parameter Template
- Connection Management
- Database Management
- Account Management (Non-Administrator)
- Account and Network Security
- Metrics and Alarms
- Interconnection with CTS
- Log Management
-
DBA Assistant
- Function Overview
- Viewing the Overall Status of a DB Instance
- Managing Real-Time Sessions
- Viewing Performance Metrics
- Subscribing to Intelligent O&M
- Viewing Storage Usage
- Viewing Table Diagnosis Results
- Setting a Diagnosis Threshold
- Viewing Top Databases and Tables by Physical File Size
- Viewing Slow Query Logs
- Concurrency Control
- Auto Flow Control
- Managing Diagnosis Reports
- Task Center
- Managing Tags
- Managing Quotas
-
FAQs
-
Product Consulting
- What Should I Pay Attention to When Using RDS?
- Will My RDS DB Instances Be Affected by Other User Instances?
- Will Different RDS DB Instances Share CPU and Memory Resources?
- How Long Does It Take to Create an RDS DB Instance?
- What Can I Do About Slow Responses of Websites When They Use RDS?
- What Is the Time Delay for Primary/Standby Replication?
- Can Multiple ECSs Connect to the Same RDS DB Instance?
- Will Backups Be Encrypted After Disk Encryption Is Enabled for My RDS Instance?
- What Is the Availability of RDS DB Instances?
- Does RDS Support Cross-AZ High Availability?
- Can RDS Primary/Standby DB Instances Be Changed to Single DB Instances?
- What Are the Differences Between RDS for MySQL and TaurusDB?
- Does RDS Support CloudPond?
- What Encryption Functions Does RDS for MySQL Support?
- Is RDS for MySQL Compatible with MariaDB?
- Does RDS for MySQL Support TokuDB?
- What Are the Restrictions on RDS for MySQL Instances After GTID Is Enabled?
- What Is the Maximum Size Allowed for a Single Table in RDS for MySQL Instances?
- Can I Use an Encrypted Password to Log In to an RDS DB Instance?
- What Are the Differences Between Floating and Private IP Addresses of RDS DB Instances?
- What Can I Do If I Can't Find My RDS Resources?
- Resource Freezing, Release, Stopping, Deletion, and Unsubscription
-
Resource and Disk Management
- Which Types of Logs and Files Occupy RDS Storage Space?
- Does RDS Support Storage Scale-Down of DB Instances?
- Which Items Occupy the Storage Space of My RDS DB Instances?
- How Much Storage Space Is Required for DDL Operations?
- What Are the Differences Between the Storage Space and Backup Space of an RDS for PostgreSQL Primary/Standby Instance?
- How Do I Prevent a Sharp Increase in Data Disk Usage If I Want to Push a Large Amount of Data to My RDS for SQL Server Instance in a Short Period of Time?
-
Database Connection
- What Should I Do If I Can't Connect to My RDS DB Instance?
- What Do I Do If the Number of RDS Database Connections Reaches the Upper Limit?
- What Is the Maximum Number of Connections to an RDS DB Instance?
- What Should I Do If an ECS Cannot Connect to an RDS DB Instance Through a Private Network?
- What Should I Do If My RDS Instance Fails to Be Connected Due to Database Client Problems?
- What Should I Do If an RDS Database Problem Causes a Connection Failure?
- Do Applications Need to Support Reconnecting to an RDS DB Instance Automatically?
- Why Can't I Ping My EIP After It Is Bound to an RDS DB Instance?
- Can I Access an RDS DB Instance Over an Intranet Connection Across Regions?
- Why Did the New Password Not Take Effect After I Reset the Administrator Password of My RDS Instance?
- Can I Access Standby RDS DB Instances?
- How Do I Check the Connections to an RDS for MySQL Instance?
- Will I Be Logged Out If the Connection to RDS for SQL Server Instances Times Out?
- What Should I Do If an RDS for SQL Server DB Instance Failed to Be Connected?
- Can an External Server Access the RDS Database?
- Will My Access Be Restricted by Bandwidth When I Connect to My Instance from an ECS over a Private Network?
- How Can I Install SQL Server Management Studio?
-
Database Migration
- What Types of DB Engines Does RDS Support for Importing Data?
- Why Do I Need to Use the mysqldump or pg_dump Tools for Migration?
- What Should I Do When a Large Number of Binlog Files Cause Storage Space Insufficiency During an RDS MySQL Instance Migration?
- Precautions for Exporting Large Tables Through mysqldump
- Commands for Exporting Data Through mysqldump
-
Database Permission
- Why Does the Root User of My RDS Instance Not Have the Super Permissions?
- What Are the Differences Between RDS ManageAccess and DAS Permissions?
- How Do I View Authorized Databases After a Local Client Is Connected to an RDS DB Instance?
- Can Multiple Users Log In to an RDS Instance Through DAS at the Same Time? Will the Accounts Be Locked If I Enter Wrong Passwords Several Times in a Row?
- Does RDS for MySQL Support Multiple Accounts?
- Why Did I Fail to Create an Object on the postgres Database as a Common User?
- What Should I Do If a Role Failed to Be Deleted from an RDS for PostgreSQL Instance?
- Why Did My RDS for PostgreSQL Migration Fail?
- How Do I Grant the REPLICATION Permission to an RDS for PostgreSQL Database User?
- Why Is An Error Reported When I Attempt to Change a Table Owner of My RDS for PostgreSQL Instance?
- How Are the Login Name Permissions of RDS for SQL Server 2017 Enterprise Edition Primary/Standby DB Instances Synchronized to Its Read Replicas?
- After a Primary Instance Account Is Deleted and Recreated on RDS for SQL Server, Will the Permissions Be Automatically Synchronized?
-
Database Storage
- What Types of Storage Does RDS Use?
- How Do I View the Storage Usage of My RDS Instance?
- What Storage Engines Does RDS for MySQL Support?
- Does RDS for MySQL Support Stored Procedures and Functions?
- What Should I Do If My Data Exceeds the Available Storage of an RDS for MySQL Instance?
- Where Are the Database Files Created on My RDS for SQL Server Instance Stored?
-
Database Usage
- How Do I Use DAS to Query SQL Statements?
- How Do I View Session IDs and Login and Logout Time of an RDS Database?
- How Do I Create a Scheduled Task for My RDS for MySQL Instance?
- What Should I Do If the root Account of My RDS for MySQL Instance Was Deleted by Mistake?
- What Should I Do If Garbled Characters Are Displayed After SQL Query Results Are Exported to an Excel File for My RDS Instance?
- Does the OPTIMIZE TABLE Operation Lock Tables on an RDS DB Instance?
- Does RDS for MySQL 8.0 Support Full-Text Search?
- How Do I Use the mysqlbinlog Tool?
- Why Is an Error Reported When I Attempt to Delete a Database from My RDS for SQL Server Primary/Standby DB Instance?
-
Backup and Restoration
- How Do I View My Backup Storage Usage?
- How Is RDS Backup Data Billed?
- Why Has Automated Backup of My RDS Instance Failed?
- Why Is Data Lost or Deleted from My RDS Instance?
- How Long Does RDS Store Backup Data For?
- How Do I Clear RDS Backup Space?
- Can My RDS Instance Still Be Used in the Backup Window?
- How Can I Back Up an RDS Database to an ECS?
- Can I Dump RDS Backup Files to My OBS Bucket?
- Does RDS for MySQL Support Table-Level Backup to a Specified OBS Bucket?
- Can I Delete the RDS for MySQL Backup Policy?
- Does RDS for PostgreSQL Support Table PITR?
- How Are Unsynchronized Backups Generated for RDS for SQL Server DB Instances?
- What Should I Do If I Failed to Obtain a Backup Because the Name of the Bucket for Storing My RDS Backups Was Changed?
-
Read Replicas and Read/Write Splitting
- Why Can't I Purchase Read Replicas on the RDS Console?
- Can I Change the Replication Mode Between RDS Primary Instances and Read Replicas?
- Does RDS Support Read/Write Splitting?
- Does RDS for MySQL Support Sharding and Read/Write Splitting?
- Can I Request Multiple Read/Write Splitting Addresses for My RDS for MySQL Instance?
- Database Monitoring
-
Capacity Expansion and Specification Change
- Are My RDS DB Instances Still Available During Storage Scale-up and Instance Class Change?
- Why Does My RDS Instance Become Faulty After Its Database Port Is Changed?
- Can I Change the VPC or Subnet that My RDS DB Instance Belongs To?
- How Do I Distinguish Between General-Purpose and Dedicated RDS for MySQL Instances Using Cloud SSDs?
-
Database Parameter Modification
- Can I Use SQL Commands to Modify Global Parameters of My RDS Instance?
- How Do I Change the Time Zone of an RDS DB Instance?
- How Do I Set the Encoding Format of the RDS for MySQL 8.0 Character Set?
- How Do I Set Case Sensitivity for RDS for MySQL Table Names?
- How Do I Enable Query Caching for My RDS for MySQL Instance?
- How Do I Configure a Password Expiration Policy for My RDS for MySQL Instance?
- How Do I Change the Transaction Isolation Level of an RDS for MySQL Instance?
- How Do I Ensure that the Character Set of an RDS MySQL Database Is Correct?
- How Do I Use the utf8mb4 Character Set to Store Emojis in an RDS for MySQL DB Instance?
- What Inappropriate Parameter Settings Will Cause Unavailability of My RDS for PostgreSQL Instance?
- How Do I Set the Upper Limit for the Storage Space Occupied by Temporary Files of My RDS for PostgreSQL Instance?
- How Do I Configure the test_decoding Extension for My RDS for PostgreSQL Instance?
- Where Should I Store NDF Files for RDS for SQL Server?
- How Do I Modify the Collation of an RDS for SQL Server Character Set?
- Log Management
-
Network Security
- How Can Data Security Be Ensured During Transmission When I Access an RDS Instance Through an EIP?
- How Can I Prevent Untrusted Source IP Addresses from Accessing RDS?
- How Do I Import the SSL Certificate of an RDS Instance to a Windows or Linux Server?
- How Do I Check the Validity Period of the SSL Certificate of My RDS for MySQL Instance?
- What Are the Possible Causes for Data Corruption of an RDS Instance?
- After My RDS DB Instance Is Deleted, Why Can't the Associated Security Group Be Deleted Immediately?
- Version Upgrade
- Developer-Related APIs and SDKs for RDS
-
Product Consulting
- General Reference
Copied.
What Is the Maximum Number of Connections to an RDS DB Instance?
RDS does not have constraints on how many connections are supported. It depends on the default values and value ranges of the following parameters: max_connections and max_user_connections for the MySQL DB engine and max_connections for the PostgreSQL DB engine. You can customize these parameters in a parameter template.
Definition
The maximum number of connections refers to the concurrent connections allowed for a DB instance.
How to Change It
- RDS for MySQL
You can change the maximum number of connections on the console. For details, see Modifying Parameters.
You can run the following command to query the maximum number of connections allowed:
show global variables like 'max_connections';
- RDS for PostgreSQL
You can change the maximum number of connections allowed on the console. For details, see Modifying Instance Parameters.
You can run the following command to query the maximum number of connections allowed:
show max_connections;
If you want to change the maximum number of connections by running commands, submit a service ticket to apply for required permissions.
Setting the Maximum Number of Connections to an Appropriate Value
- RDS for MySQL
- In addition to the value of max_connections, the maximum number of concurrent client connections allowed by RDS for MySQL is also limited by the maximum number of files that can be opened by a single process in the operating system. For example, if the maximum number of files that can be opened by each process is set to 100 in the operating system, the max_connections parameter does not take effect even if it is set to 200.
- Check the maximum number of files that can be opened by a single process in the operating system. The default value is 1024.
ulimit -n
- Check the value of open_files_limit. open_files_limit indicates the maximum number of files that can be opened by a single process, which is read from the operating system during RDS for MySQL startup.
show variables like 'open_files_limit';
- Suggestions
The maximum number of RDS for MySQL connections can be modified to any amount allowed by your instance specifications. The maximum number of connections supported is closely related to the instance memory.
max_connections: maximum number of concurrent connections to a DB instance. If this parameter is set to default, the maximum number of connections depends on the memory (unit: GB) of the DB instance. The formula is as follows:
Estimated value of max_connections = Available node memory/Estimated memory occupied by a single connection
NOTE:
- Available node memory = Total memory – Memory occupied by the buffer pool – 1 GB (mysqld process/OS/monitoring program)
- Estimated memory usage of a single connection (single_thread_memory) = thread_stack (256 KB) + binlog_cache_size (32 KB) + join_buffer_size (256 KB) + sort_buffer_size (256 KB) + read_buffer_size (128 KB) + read_rnd_buffer_size (256 KB) ≈ 1 MB
The following table lists the default values of max_connections for different memory specifications.
Table 1 Max_connections for different memory specificationsMemory (GB)
Connections
512
100,000
384
80,000
256
60,000
128
30,000
64
18,000
32
10,000
16
5,000
8
2,500
4
1,500
2
800
Set the maximum number of connections to an appropriate value because more connections consume more system resources.
- RDS for PostgreSQL
Set max_connections based on the complexity of your workloads. For details, see Instance Usage Specifications.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot