Issue with postgre sql

Rubens Max 160 Reputation points
2024-10-24T14:47:53.2933333+00:00

I am currently experiencing high latency with PostgreSQL queries during peak load times in our production environment. Here are the details:

PostgreSQL Version: 13.3, Database Size: Approximately 500 GB

During peak hours, response times for certain queries can exceed 5 seconds, whereas they typically run under 200 ms during off-peak times.

I suspect it could be related to locks, memory usage, or perhaps insufficient configuration for handling concurrent connections.

What additional steps can I take to diagnose and resolve the high latency issues during peak loads? Are there specific queries or logs I should examine?

Thank you for your assistance

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Vijayalaxmi Kattimani 3,250 Reputation points Microsoft External Staff Moderator
    2024-10-25T06:57:50.8566667+00:00

    Hi @Rubens Max,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    As we understand that, you are trying to resolve high latency issue during peak loads with PostgreSQL queries.

    There are several steps you can take to diagnose and resolve high latency issues in your PostgreSQL database during peak load times. Here are some suggestions:

    1. Check for long-running queries.

    2. Check for memory usage.

    3. Check for High CPU utilization.

    We request you to refer the below mentioned links for more information.

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-high-cpu-utilization?source=recommendations&tabs=postgres-13

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-identify-slow-queries?source=recommendations

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-high-memory-utilization?source=recommendations

    I hope, This response will address your query and helped you to overcome on your challenges.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.