Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Recurring Spikes in Cloud SQL (MySQL) Usage - Occurring 4-5 Times Daily, Around :28-:30 Past Hour

Hi,

I'm experiencing a peculiar pattern of recurring spikes in my Cloud SQL for MySQL Enterprise instance (running version 8.0). I observe these spikes approximately 4 to 5 times throughout the day, and the consistent factor is that they always occur between the 28th and 30th minute past the hour. These spikes manifest as a noticeable increase in [CPU Utilization by 79%] and last for a few minutes each time.

GeorgeJackBand_0-1744260714821.png

The fact that these spikes consistently happen within a specific 2-3 minute window past the hour, multiple times a day, strongly suggests a scheduled process. I'm trying to understand what might be triggering this and would appreciate any insights you might have. I am actively using Google Cloud Monitoring to observe these metrics.

Here are my current thoughts:

  • Query Insights: Could Query Insights have a background process in Cloud SQL Enterprise that runs multiple times a day, specifically around the :28-:30 mark, to collect or analyze data?
  • Google Cloud Monitoring: Could the Google Cloud Monitoring service itself be performing some kind of intensive data collection or aggregation at these specific times, which is reflected in the Cloud SQL metrics?
  • Automated Tasks within the Database: Are there any specific automated maintenance tasks or background processes inherent to Cloud SQL Enterprise or MySQL 8.0 that might be scheduled to run around this time multiple times a day? How can I investigate scheduled events in Cloud SQL MySQL 8.0?

The consistent timing within the hour is the most intriguing aspect. Has anyone else encountered such a specific and recurring pattern of spikes in their Cloud SQL Enterprise (MySQL 8.0) usage? What specific metrics in Google Cloud Monitoring should I be focusing on? What logs or configurations should I be examining to pinpoint the process responsible for these intermittent increases in usage?

Any help or suggestions on how to diagnose and resolve this would be greatly appreciated!

Solved Solved
0 2 102
1 ACCEPTED SOLUTION

Hi @GeorgeJackBand,

That recurring CPU spike around the :28–:30 mark really points to some kind of scheduled process. You may need to check if Point-in-Time Recovery (PITR) is enabled, Cloud SQL handles binary log flushing and purging in the background, which can trigger short CPU spikes at regular intervals.

For troubleshooting and confirming the root cause, these documentations might be able to help: 

Should you need further help, you may also want to contact Google Cloud Support to assist in digging deeper into the root cause.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

2 REPLIES 2

Hi @GeorgeJackBand,

That recurring CPU spike around the :28–:30 mark really points to some kind of scheduled process. You may need to check if Point-in-Time Recovery (PITR) is enabled, Cloud SQL handles binary log flushing and purging in the background, which can trigger short CPU spikes at regular intervals.

For troubleshooting and confirming the root cause, these documentations might be able to help: 

Should you need further help, you may also want to contact Google Cloud Support to assist in digging deeper into the root cause.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Thank you so much for your answer! Yes, PITR is enabled on my database and that caused the issue.