ReconsileError due to failed Prepared statement
What happened?
Multiple User objects enter into ReconcileError state with the following error:
observe failed: cannot select user: Error 1615: Prepared statement needs to be re-prepared
The affected objects are staying in this state and never seem to recover. Restarting the crossplane controller doesn't seem to work either.
How can we reproduce it?
No idea how to reproduce this issue. It happens randomly on various objects from time to time. I'm happy to provide any information required to figure out what the problem is.
What environment did it happen in?
Crossplane version: v1.1.1 Kubernetes version: v1.19 Provider-sql version: v0.2.1
We are using the bitnami-galera chart version 5.6.7 and the mariadb-galera image version: 10.5.9-debian-10-r45
Workaround: Restarting the database first and then the provider-sql solves this issue.
We also had this bug after switching from MySQL to MariaDB. This doesn't seem to be caused by provider-sql, but rather by MariaDB itself (at least in version 10.5, which we use, too).
After increasing the table_definition_cache to 4000 (as suggested here), we did not yet see the problem happen again.
Closing as stale. Please re-open and update if this is still valid.