Azure PostgreSQL Database failed connections

sappu solanki 66 Reputation points
2021-02-15T09:00:36.373+00:00

We have PostgreSQL database hosted on Azure as "Azure database for PostgreSQL".
Whenever I try to monitor database using Metrics -- > Failed Connection , it shows 4 failed connections every minute and sometime it rises high up to 25-30 failed connections.
I tried to query ideal transactions in PostgreSQL database and found that there were some ideal connections and hence I killed those connections, so for time being the graph in metrics shows 0 failed connections.
After some time when I query ideal connections, ideal connection seems to appear again which I had killed 5 mins back and graph again rises up. Most of the ideal connection has "PostgreSQL JDBC Driver" application name.
Can somebody provide any input how can i bring this failed connection down to 0 ?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,814 questions
Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KalyanChanumolu-MSFT 8,316 Reputation points
    2021-02-16T04:17:52.253+00:00

    @sappu solanki Welcome to Microsoft Q&A Forum and thank you for your interest in Azure Database for PostgreSQL server.

    The Azure system requires five connections to monitor Azure Database for PostgreSQL server.
    These are required for checking availability, storage, backups etc.
    So, the idle connections you are seeing could be the ones from Azure itself. These connections should not be killed.

    Regarding failed connections, please check if the applications or users connecting to the database are using the right credentials.

    Also, there are limits on the maximum number of connections by Pricing tier.
    If you are using Basic tier for instance, the maximum number of user connections allowed is 50.
    So, any connections above this limit will result in connection failures.

    Please let us know if you have further questions.

    ----------

    If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

    0 comments No comments