Common Errors

Why is an SQL update with a primary key slow?

Using tuples in a WHERE clause can cause a MySQL slowdown. Consider: UPDATEtblSETcol=1WHERE(pk1,pk2,pk3)IN(1,2,3),(4,5,6)After a few tuples, MySQL may switch to a full table scan and lock the entire table for the duration. It should perform as expected ...more

What can I do if I see a CPU increase after upgrading Vitess?

If you are running Vitess 7.0 or above, we introduced the schema tracker, which could be running on the VTTablets now. You can disable it in order to prevent that reporting. You will need to add track_schema_versions as false in the VTTablet. ...more

What are the steps to take after an unplanned failover?

In order to avoid creating orphaned VTTablets you will need to follow the steps below: Stop the VTTablets Delete the old VTTablet records Create the new keyspace Restart the VTTablets that are pointed at the new keyspace Use TabletExternallyReparented to ...more

Error: Could not open required defaults file: /path/to/my.cnf

If you cannot start a cluster and see that error in the logs it most likely means that AppArmor is running on your server and is preventing Vitess processes from accessing the my.cnf file. The workaround is to uninstall AppArmor: sudo service apparmor stop ...more

Error: mysqld not found in any of /usr/bin/{sbin,bin,libexec}

If you're all set up with Vitess but mysqld won't start, with an error like this: E0430 17:02:43.663441 5297 mysqlctl.go:254] failed start mysql: mysqld not found in any of /usr/bin/{sbin,bin,libexec} You will need to perform the following steps: Verify ...more

What is the default behavior of connection pooling after a failover on an external (unmanaged) MySQL?

The expected behavior is that the connection to the old primary will close and that Vitess will try to reconnect to the new primary. To ensure that the expected behavior occurs when using AWS/Aurora you will need to set the vttablet flag ...more