Azure Database for MySQL flexible server unexpected increase in CPU usage

Owen Abkes 0 Reputation points
2024-05-07T19:57:52.45+00:00

I'm running a base B-tier burstable Azure Database for MySQL instance that holds the data for a Strapi CMS backend for a client NextJS website. The CMS and subsequently the database are are not being accessed regularly, only for data updates and the NextJS website is set to only revalidate data on-demand, not based on a timer.

Over the last week or so my CPU usage ramps up for seemingly no reason. Neither the amount of connections or amount of queries changes substantially, but the CPU usage will ramp up to 100% until all connections fail and the database needs to be restarted. I understand that B-tier utilizes CPU credits, but during normal usage it generally sits somewhere between 40% and 70% usage so I wouldn't think it should be consuming credits. I have a few different clients with this same exact setup and those databases don't spike like this.

Screenshot 2024-05-07 145308

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
739 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rahul Randive 8,921 Reputation points Microsoft Employee
    2024-05-07T20:15:25.4333333+00:00

    Hi @Owen Abkes

    It seems that the issue is related to some Burstable B1s or B1ms MySQL flexible servers, where CPU usage is high. Using 1 vcore with MySQLFS consumed CPU Credit and CPU can be heavily utilized.

    As per the product team, the recommendation is, for production workloads, transitioning to either the General Purpose or Business Critical tiers.

    Please review performance limitations of burstable series instances 

    The Burstable tier is ideally more suited for non-production environments.

    To specifically address CPU-related issues, it has been advised to transitioning from the B1s/B1ms size to the B2s or B2ms, or a higher SKU.

    Thank You!