New issue
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
Read workers fail to connect to mysql server #65
Comments
We think the Oracle RAC read-write split won't work with MySQL. Oracle RAC has synchronous replication which most MySQL clusters don't. In any case, we'll need to adjust the heartbeat checks for the r workers so they connect. |
This may prevent use of Transparent Failover. We should test |
I tested out with TAF enable, taf workers cannot connect to mysql DB server and taf workers stay in "init" status |
What I Did
Rear & Write workers were configured to point to same DB:
bash-3.2$ env | grep TWO_TASK
TWO_TASK_READ=tcp(127.0.0.1:3306)/world?timeout=10s
TWO_TASK=tcp(127.0.0.1:3306)/world?timeout=10s
I set readonly_children_pct=50 in hera.txt
What I Expected
When starting server, I expected all read & write workers to start successfully
What I Saw Instead
Hera Read workers fail to start
state.log:
08/08/2019 17:35:58: hera.w 0 2 0 0 0 0 0 0 0 0 0
08/08/2019 17:35:58: hera.r 2 0 0 0 0 0 0 0 0 0 0
08/08/2019 17:35:59: hera.w 0 2 0 0 0 0 0 0 0 0 0
08/08/2019 17:35:59: hera.r 2 0 0 0 0 0 0 0 0 0 0
08/08/2019 17:36:00: hera.w 0 2 0 0 0 0 0 0 0 0 0
Error in log:
10:52:51.876367 info: [R-WORKER 6 workerservice.go:103] DB heartbeat interval: 2m0s
10:52:51.876722 info: [R-WORKER 6 cmdprocessor.go:713] setup db connection.
10:52:51.932530 warn: [R-WORKER 5 adapter.go:75] recycling, got read-only conn
10:52:51.932706 warn: [R-WORKER 5 cmdprocessor.go:719] driver error cannot use read-only conn tcp(10.244.64.202:3306)/world
10:52:51.932728 warn: [R-WORKER 5 workerservice.go:117] Can't connect to DB: cannot use read-only conn tcp(10.244.64.202:3306)/world
The text was updated successfully, but these errors were encountered: