I had a MySQL 5.7 instance on Google CloudSQL. Now i created a MySQL 8 instance.

The configuration is pretty much the same (except i use 2 CPUs instead of one, 3.75GB of RAM). Now the default config for MySQL Memory usage (like innodb_buffer_pool_size,..) seems to be the same.

I migrated about half of my applications to use this instance. What is happening now is, that the instance Memory usage goes above 3.XX GB and the service gets restarted. Which is super annoying because in that time my applications obviously crash. It seems like memory usage grows with every select statement, and everything is cached.

Here are some of the config values:

|                          key_buffer_size |           8.00  MB |
|                  innodb_buffer_pool_size |        1408.00  MB |
|                   innodb_log_buffer_size |          16.00  MB |
|                         sort_buffer_size |           0.25  MB |
|                         read_buffer_size |           0.125 MB |
|                     read_rnd_buffer_size |           0.25  MB |
|                         join_buffer_size |           0.25  MB |
|                             thread_stack |           0.273 MB |
|                        binlog_cache_size |           0.031 MB |
|                           tmp_table_size |          16.00  MB |

This makes CloudSQL pretty much unusable to me. I need MySQL 8 without crashing several times a day.

  • i think ui saw your question already and the abswer is the same innodb_buffer_pool_size is much too big
    – nbk
    Apr 21, 2021 at 13:58
  • 1.4GB is too big for 3.75GB of RAM? why does it google configure it like that then? you cant change those values on CloudSQL because google claims thats the optimal value.
    – fredalex
    Apr 21, 2021 at 15:46
  • Databases need space even a 8 GB Server gets quick full with a lot off connctions so start with a much smaller size and then see if the query run withot a problem, if the buffer us too small you will see it in the error log.
    – nbk
    Apr 21, 2021 at 16:07
  • Additional information request. Any SSD or NVME devices on MySQL Host server? Post on pastebin.com and share the links. From your SSH login root, Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) STATUS; - NOT show status; for instance brief summary for server workload tuning analysis to provide suggestions. Apr 23, 2021 at 16:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.