[MXS-1357] master_accept_reads enabled and slave doesn't get any load in ReadWrite split mode Created: 2017-08-14 Updated: 2017-08-22 Resolved: 2017-08-22 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | 2.1.4, 2.1.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Maiavria | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian Jessie on VMWARE |
||
| Attachments: |
|
| Description |
|
Hello, I have following Maxscale configuration for read-write splitting the load between maria1 and maria3; maria2 is used for backup purpose only so it has the last priority and weight=0. This configuration is used for a Galera Cluster of 3 MariaDB nodes in 10.1 version branch. I'm using Maxscale 2.1.4 and I don't know why but the SELECT statements go all to maria1, and none to maria3.
The command
is always returning the first node's name even without the option master_accept_reads. I also tried with :
I attached a screen cap of the observed load of queries on all 3 servers grouped by query type. Node 1 is getting all the load from maxscale and node 3 isn't even getting a part of the SELECT load. The strange thing this is that maxscale's RW Split service shows that 49% goes to slaves : But as master_accept_reads=1, it seems that master=master and slave=master too without the weight being taken into account because there isn't event 10% load going to node 3. Expected behavior would be :75% of the load going to master (50% as master + 25% because master_accept_reads=1 and weight is 1/2) and 25% of the SELECT load going to slave node3. |
| Comments |
| Comment by markus makela [ 2017-08-21 ] | ||
|
Please try enabling the info log level by adding log_info=true under the maxscale section. This will log each statement processed by MaxScale. Check that the SELECT statements aren't done inside transactions and that autocommit is enabled. | ||
| Comment by Maiavria [ 2017-08-22 ] | ||
|
Solved changing the configuration to
The problem was that max_slave_connections was only set to 1 as explained by Markus on this topic : https://groups.google.com/forum/#!topic/maxscale/aXmyizCtF84 Thank you! | ||
| Comment by markus makela [ 2017-08-22 ] | ||
|
Closing as the issue was solved. |