Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
All solutions
    • All solutions for Managed PostgreSQL
    • Recovering a Managed Services for PostgreSQL cluster after its disks become Read Only
    • You are unable to delete your Managed Service for PostgreSQL cluster in the Dead status if deletion protection was enabled for it
    • Managed Service for PostgreSQL cluster switches to the Unknown state immediately after creation
    • Resolving issues with updating configurations of clusters with local-ssd disks
    • Resolving the consequences of cluster storage overflow with WAL logs
    • Resolving the psql error "could not translate host name to address nodename nor servname provided, or not known"
    • Resolving the error Unrecognized configuration parameter "stats_temp_directory"
    • Resolving the "max_connections conn_limit is too high" error
    • Resolving the "422 UNPROCESSABLE ENTITY The specified extension <'ext_name'> is not present in shared_preload_libraries" error
    • Understanding the Conn limit parameter
    • How to set up SQL query filtering
    • How to enable SQL query logging

In this article:

  • Scenario description
  • Solution
  1. Managed PostgreSQL
  2. Understanding the Conn limit parameter

Understanding the Conn limit parameter

Written by
Yandex Cloud
Updated at November 27, 2023
  • Scenario description
  • Solution

Scenario descriptionScenario description

You need to understand how the Conn limit parameter works in Yandex Managed Service for PostgreSQL.

SolutionSolution

The Conn limit setting specifies the maximum allowable number of connections per user. In session pooling, this setting limits the number of user connections with each host in the PostgreSQL cluster.

Basic principles of session pooling:

  1. When creating a user, Yandex Managed Service for PostgreSQL reserves for this user 50 connections to each host in the PostgreSQL cluster by default. The minimum number of connections per user is 1.
  2. The total number of connections reserved for users must not exceed the value of the Max connections parameter. Yandex Managed Service for PostgreSQL reserves 15 service connections per host.

For example, if the cluster has the "max_connections": 100 setting, you can reserve a maximum of 85 connections per cluster host for users. At the same time, the sum of the Conn limit settings for all users in the cluster must not exceed 85.

Note

The Max connections setting specifies the maximum number of simultaneous connections to the PostgreSQL host. The minimum value is 1, while the maximum value and default value depend on the selected host class and are defined by the formula:
200 × <number of vCPUs per host>.

For hosts with a guaranteed vCPU share below 100% (burstable), fixed maximum values are used:

  • b1.nano, b1.micro, b2.nano, b2.micro — 100
  • b1.medium, b2.medium — 200.

By default, the maximum value is used.

You can find detailed information in the documentation.

Was the article helpful?

Previous
Resolving the "422 UNPROCESSABLE ENTITY The specified extension <'ext_name'> is not present in shared_preload_libraries" error
Next
How to set up SQL query filtering
Yandex project
© 2025 Yandex.Cloud LLC