Help Center/ GaussDB(for MySQL)/ Troubleshooting/ Performance Issues/ CPU Resource Exhaustion Caused by Too Many Concurrent Slow Queries
Updated on 2023-10-19 GMT+08:00

CPU Resource Exhaustion Caused by Too Many Concurrent Slow Queries

Scenario

A large number of slow select count(0) operations are being concurrently executed on a DB instance. As a result, CPU resources are exhausted, causing system breakdown risks.

After your ran Show processlist, the command output showed that select count(0) operations are concurrently executed for multiple times.

Possible Causes

Applications triggered a large number of concurrent and slow select count(0) operations, exhausting CPU resources.

Solution

  1. Apply for permissions to intermittently kill the slow select count(0) operations in batches. Locate the source of triggering the slow operations, stop the source, and optimize SQL statements.

    Kill the slow operations in batches.

  2. Increase CPU idle time.