Postgres flexible server max_connections parameter

pularz 1 Reputation point
2022-03-14T09:51:17.403+00:00

Hello,

According to the limits displayed in the docs here: https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-limits the maximum number of connections available for the B1ms tier is 50. However, I can easily adjust this value in the 'Server parameters' section. What are the consequences of this? Can I raise this value without any consequences? The docs seem like this value is not changeable.

When I was using the default limit for the B1ms tier and reached 50 connections, I encountered the error FATAL: sorry, too many clients already. I raised the limit to 150 and everything seems to be working just fine. Can I expect some issues or automatic tier upgrade?

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,631 Reputation points
    2022-03-16T06:38:34.853+00:00

    Hi @pularz , thanks for your patience.

    We have received the response back from the internal team.

    • Max connection limit provided in the documentation is safe limit to configure for every tier.
    • We can set any value for max_connections parameter to more value but it could not be in safe limits and could result in out of memory exception or other memory issues.
    • There is no SKU effect on changing this value.
    • If we want to increase the parameter more than safe value its better to implement connection pooling using PgBouncer etc.

    Please let us know if this helps or you have nay other queries and we can discuss gladly.

    ----------

    If answer is helpful please please click on 183582-image.png as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions. Thank you for helping to improve Microsoft Q&A!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.