El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Relational Database Service/ User Guide (Ankara Region)/ FAQs/ Database Connection/ What Is the Maximum Number of Connections to an RDS DB Instance?

What Is the Maximum Number of Connections to an RDS DB Instance?

Updated on 2024-04-11 GMT+08:00

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.

Changing the Maximum Number of Connections

  • RDS for MySQL

    Or, you can query or change the maximum number of connections allowed using commands.

    1. Querying the maximum number of connections
      show global variables like 'max_connections';
    2. Changing the value of max_connections under mysqld in the my.cnf file
      [mysqld]
      max_connections = 1000
  • RDS for PostgreSQL

    You can query the maximum number of connections allowed using commands.

    show max_connections;

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 specifications

      Memory (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.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback