Relative Content

Tag Archive for mysqlamazon-web-servicesamazon-rdsgo-gorm

Gorm v2 RDS MySQL DB Instance IP Caching on DB Cluster Switchover

Gorm v1 and v2 Fargate services run against an AWS RDS MySQL Aurora database, connected to the generic (Writer) cluster endpoint. When the cluster is switched over from Blue to Green deployments, AWS sets the “old” DB instance into a read-only mode. It appears that after the switch, the gorm v1 services immeditely switch over to the new DB instance, whereas the v2 ones generate “The MySQL server is running with the –read-only option so it cannot execute this statement” error, so they are stuck being connected to the old DB instance, till they are restarted. One service was restarted 20 min after the switch, and it generated the error upon its closing, so it kept its connection to the old database for that long.