CPU on mysql flexible server staying at 100%

Adam Hamer 0 Reputation points
2025-02-16T13:43:22.64+00:00

Issue on 'ecco-db1' in this window at GMT 8.25am on 16th Feb 2025

CPU hit 100% for a long time until I restarted the db. Our applications were at their lowest usage for the week (Sat/Sun) - do a timeline over the weekend and you'll see. So it was not our applications causing the issue.

We would like to know what caused the spike. The action we had to take was to restart, causing 7 mins downtime for some of our apps.

Thanks,
Adam

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
909 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vijayalaxmi Kattimani 1,480 Reputation points Microsoft Vendor
    2025-02-17T02:10:23.0833333+00:00

    Hi @Adam Hamer,

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

    As we understand that, you have experienced a significant CPU spike on 'ecco-db1' on the 16th of February 2025 at 8:25 AM GMT, which led to a 7-minute downtime for some of your applications. Given that your applications were at their lowest usage for the week, it is indeed unusual for the CPU to hit 100%.

    We would like to inform you that, there are several potential causes for CPU spikes, and it's important to differentiate between instance-level and cluster-level high CPU usage.

    Here are some common causes and steps to investigate.

    1. Transient Issues: Sometimes, CPU spikes can be transient and correct themselves. If this was a one-time occurrence, it might have been a transient issue.
    2. Background Processes: Check for any background processes or scheduled tasks that might have run during that time.
    3. Malware or Viruses: Ensure that your system is free from malware or viruses, as these can cause high CPU usage.
    4. Faulty Drivers or Updates: Outdated or corrupt drivers, as well as recent updates, can lead to high CPU usage.
    5. Memory Leaks: Some applications might have memory leaks, causing them to consume more memory over time and leading to high CPU usage.
    6. High CPU Demand from Applications: Certain applications, especially resource-intensive ones, can cause CPU spikes.

    To investigate further, you can:

    • Use the Performance Plugin to identify the top processes consuming CPU during the spike.
    • Check the Event Viewer for any system log entries that might indicate application crashes or system errors correlating with the CPU spike.
    • Review any scheduled tasks or cron jobs configured within your application.

    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.