Docs

    Azure Flexible Servers provide a fully managed database service for MySQL. This documentation offers comprehensive guidance on diagnosing potential issues that may occur with this service. It identifies common sources of errors and provides actionable recommendations for effective resolution.

    We monitor the following metrics:

    •  azure.my_sql_flexible_server.health
    • azure.my_sql_flexible_server.cpu.percent
    • azure.my_sql_flexible_server.memory.percent
    • azure.my_sql_flexible_server.storage.percent
    • azure.my_sql_flexible_server.aborted_connections.count
    • azure.my_sql_flexible_server.cpu_credits_remaining.count

     

    Common Errors when Monitoring Azure MySQL Flexible Servers


    When monitoring Azure Flexible Servers, various issues may arise, affecting the reliability and performance of your database service. Below are common errors and their potential resolutions.

     

    Connection Issues

    Connection issues can significantly impact the performance and availability of your Azure Flexible Servers. These issues can stem from various factors, including network connectivity problems and exceeding configured connection limits. Proper diagnosis and resolution of these issues are crucial to maintain the smooth operation of your database services.

     

    Possible Causes

    • Network Connectivity Problems
      • Ensure that network configurations are correctly set up.
      • Verify that firewall rules allow inbound and outbound traffic to the server instance.
      • Investigate Azure's network infrastructure for any disruptions or maintenance activities.
    • Exceeding Connection Limits
      • Check if the number of connections exceeds the configured limits.
      • Optimize application code to manage database connections efficiently.
      • Increase the connection limit if necessary.

     

    Performance Degradation

    Performance degradation can affect the responsiveness and efficiency of your Azure Flexible Servers, leading to slower query execution and resource bottlenecks. 

     

    Possible Causes

    • High Query Latency
      • Analyze slow queries using performance insights tools.
      • Optimize queries and indexes to improve performance.
      • Increase the server size to provide more resources if needed.
    • Resource Bottlenecks
      • Monitor CPU, memory, and I/O usage to identify resource-intensive processes.
      • Adjust the workload or optimize resource usage.
      • Scale up the server or add replicas to distribute the load.

     

    Storage Issues

    Storage issues can lead to performance problems and data management challenges for your Azure Flexible Servers. Properly managing storage resources and addressing potential issues are crucial to maintaining the reliability and efficiency of your database services. 

     

    Possible Causes

    • Disk Space Exhaustion
      • Check disk usage on the server instance to identify space-consuming files or logs.
      • Implement data archiving strategies to manage large data sets.
      • Increase the storage size if necessary to accommodate additional data.
    • High IOPS Utilization
      • Monitor the IOPS usage and identify high I/O operations.
      • Optimize queries and indexes to reduce IOPS.
      • Scale storage performance tier if required

     

    Missing CPU Credits

    For burstable instances in Azure Flexible Servers, missing CPU credits can lead to performance issues when the server exceeds its baseline CPU utilization. 

    Possible Causes

    • High CPU Utilization
      • Monitor CPU usage to identify periods of high CPU utilization.
      • Optimize application and database queries to reduce CPU load.
      • Consider upgrading to a larger instance size or a non-burstable instance type if sustained high CPU usage is required.
    • Exhausted CPU Credits
      • Track CPU credit balance to ensure that sufficient credits are available.
      • Reduce workload during peak times to prevent CPU credit exhaustion.
      • Schedule less critical or non-time-sensitive operations during off-peak hours to manage CPU credit consumption.
    • Inefficient Query Execution
      • Analyze and optimize inefficient queries that consume excessive CPU resources.
      • Use indexing strategies to reduce CPU load during query execution.

     

    Resources