Description
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