Our Google Cloud MySQL database had a huge and unexpected increase of used space in the span of a couple of days. It went from 15 GB to 16TB! This is also obviously causing issues with our billing as the cost for the SQL storage drastically increased.
After checking the storage via the Google Cloud SQL System Insights, we noticed that the increase is due to what Google SQL calls tmp_data
. Here you can see how it skyrocketed:
Restarting the database instance cleared this tmp_data
and restored the DB storage usage to the expected 15 GB it was before.
The SQL logs also don't seem to show anything significant other that error messages related to no available storage when the limit was hit.
I would like to understand what might be causing this issue. To start, I tried to look up what tmp_data
is, but I cannot find a reliable answer to what this represents.
Questions:
- What is
tmp_data
in Google Cloud MySQL? - What could I investigate to try to understand what the issue might be?
internal_tmp_disk_storage_engine
to MyISAM. This might help reducing the issue, however it is still happening.