We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running large migrations with multi-tenancy setup (MySql) we are hitting this error
Error: driver: bad connection
This happens after a long migration and before the start of the next one, I assume the "bad connection' has infact timed out.
The text was updated successfully, but these errors were encountered:
Hey, @jmortlock,
Which command do you use in the multi-tenant setup? Also, what do you consider a "long" migration? How long has it been running?
Sorry, something went wrong.
Hi
I can see an example here after 40mins
Error: driver: bad connection [mysql] 2024/10/28 20:35:11 connection.go:49: bad connection -- 12 sql statements -- 5 migrations -- 39m23.268774378s -------------------------
I am running this command to apply the migrations
atlas migrate apply --exec-order non-linear --env aws
Using the setup outlined in your docs, i.e. this sorta thing
env "aws" { src = "db/schema.hcl" for_each = toset(data.sql.tenants.values) url = urlsetpath(data.runtimevar.url, each.value) migration { dir = "file://db/migrations" } }
I suspect whats happening is because we are using RDS proxy service which has a much tighter default Idle timeout of 30mins (mysql default is 8hours).
Current workaround is to restart the migrations when the error is encountered.
No branches or pull requests
When running large migrations with multi-tenancy setup (MySql) we are hitting this error
This happens after a long migration and before the start of the next one, I assume the "bad connection' has infact timed out.
The text was updated successfully, but these errors were encountered: