Google Cloud SQL 进入只读模式

Google Cloud SQL going into read only mode

每隔几天左右,当我查看我们的应用引擎日志时,我会在应用尝试连接到 Google SQL 实例时看到此错误

Query failed w/ error: The MySQL server is running with the --read-only option so it cannot execute this statement

我了解到这可能会在维护期间发生 window,但已配置为每周一次。有谁知道这可能是什么原因造成的?

这可能是因为在您执行查询时备份了 Cloud SQL 实例。

CloudSQL 默认情况下每天备份实例,在备份作业时 运行 表处于只读模式.

请查看此官方页面了解更多信息: https://cloud.google.com/sql/docs/backup-recovery/backups#how_backups_affect_instance_operations

希望对您有所帮助。