QuestionQ56

VerifiedDeploy scalable and highly available databases in Google Cloud

Your Cloud SQL for PostgreSQL database that supports a financial application has been seeing “deadlock detected” errors during end-of-month processing. CPU utilization rises to 90% during these periods, and several long-running queries consume significant resources. You need to identify the particular queries causing the deadlocks and implement monitoring to address similar issues before they result in application failures.

What should you do?

Explanation

Cloud SQL System Insights includes CPU utilization and PostgreSQL deadlock-count metrics, and query-performance insights can reveal high-load and long-running queries. The log_lock_waits database flag records lock-wait information needed to investigate contention. Cloud Monitoring alerts for elevated CPU utilization and connection count provide early warning of the capacity and concurrency conditions that can accompany deadlocks.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!