What Is the Maximum Number of Connections to an RDS for PostgreSQL Instance?
RDS for PostgreSQL does not have constraints on how many connections are supported. It depends on the default values and value ranges of certain parameters in your DB engine.
Definition
The maximum number of connections refers to the concurrent connections allowed for a DB instance.
How to Change It
- You can change the maximum number of connections allowed on the console. For details, see Modifying Parameters of an RDS for PostgreSQL Instance.
- 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
The max_connections parameter is closely related to the memory (GB) of the DB instance. The calculation formula is as follows:
Parameter |
Formula |
Version Involved |
Unit |
---|---|---|---|
max_connections |
min((total_mem_kb - shared_buffer) * 1024.0 / 16MB, 5000) |
All versions |
Count |
The following table lists the default values of max_connections for different memory specifications.
Memory (GB) |
Max. Client Connections (max_connections) |
---|---|
512 |
5,000 |
384 |
5,000 |
256 |
5,000 |
128 |
5,000 |
64 |
3,072 |
32 |
1,536 |
16 |
768 |
8 |
384 |
4 |
192 |
2 |
96 |
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