[MXS-587] readwritesplit module - intensive load - SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query Created: 2016-02-23  Updated: 2016-05-31  Resolved: 2016-05-31

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: 1.2.1, 1.3.0
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Mithun Assignee: Timofey Turenko
Resolution: Incomplete Votes: 0
Labels: None
Environment:

Ubuntu 14.04 x64_64 LTS + MariaDB Galera + Maxscale


Attachments: File maxscale1.log    
Issue Links:
Duplicate
duplicates MXS-579 Slave failure not handled gracefully ... Closed

 Description   

The module readwritesplit works perfectly for small queries. An operation of reading 80,000 rows from the db and processing it and writing to the db causes maxscale to return:

SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query

Meanwhile if readconnroute module is used for the above purpose. It does it without any errors.

EDIT1
===================
Please find the configuration I used.
---------------------------------------------------------------
#/etc/maxscale.cnf
[maxscale]
threads=4
auth_connect_timeout=600
auth_read_timeout=1200
auth_write_timeout=1200
maxlog=1
log_info=1
log_debug=1

[Splitter Service]
type=service
router=readwritesplit
servers=devdb01, devdb02
max_slave_connections=100%
user=XXX
passwd=ZZZ
enable_root_user=true
localhost_match_wildcard_host=1
router_options=synced

[Splitter Listener]
type=listener
service=Splitter Service
protocol=MySQLClient
port=3306
address=127.0.0.1

[devdb01]
type=server
address=192.168.0.110
port=3306
protocol=MySQLBackend
[devdb02]
type=server
address=192.168.0.111
port=3306
protocol=MySQLBackend

[Galera Monitor]
type=monitor
module=galeramon
disable_master_failback=1
servers=devdb01, devdb02
user=XXX
passwd=ZZZ

[CLI]
type=service
router=cli

[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=localhost
port=6603

Log
---------------------------------------------------------
Please find the log in attachment.



 Comments   
Comment by Dipti Joshi (Inactive) [ 2016-02-23 ]

johan.wikman, markus makela have we looked at this ?

Comment by markus makela [ 2016-02-23 ]

Please provide logs and the configuration file you used when this happened. Usually there's a reason and that reason is in the error logs in /var/log/maxscale/. If nothing suspicious is in there, this would seems to be a valid bug.

Comment by Mithun [ 2016-02-24 ]

I have updated the logs and the config used.

Thanks.

Comment by markus makela [ 2016-02-24 ]

The log has no errors in it so I assume none were logged. This could be related to MXS-579.

Comment by markus makela [ 2016-04-15 ]

tuxmithun Can you try this with the 1.4.1 release of MaxScale? I think that this could be caused by a network error between MaxScale and a slave. When a SELECT query is sent to a slave and the connection to that slave is lost before the result returns, the client is disconnected. If you could try to confirm that a network error does occur between MaxScale and one of the slaves, I think we could close this as Not A Bug.

Comment by Xavier [ 2016-04-25 ]

I have exactly the same problem.
Its MaxScale, on read/write split. High I/O.
Confirmed not loosing connectivity at all.

All in Docker. Slave DB and MaxScale in same container.

Can reproduce the error anytime, siege the webpage and you will see 503. In my case, magento.. clearly returns the same error.

I had produced same tests with the normal routing, and does not produce such errors.

– Tested version 1.3.0 Gonna update and test with 1.4.1

Comment by Mithun [ 2016-05-24 ]

markus makela I have tested with maxscale version 1.4.3 with the following error:

SQLSTATE[HY000] [1045] Access denied for user 'XXXXXX'@'127.0.0.1' (using password: YES) to database 'XXXXX'

This is inspite of the following permission:

GRANT ALL PRIVILEGES ON *.* TO 'XXXXXX'@'%' IDENTIFIED BY PASSWORD 'XXXXXXXXXXXXXXXXXXXXXXXXXXX'

Comment by markus makela [ 2016-05-24 ]

Do you have anything in MaxScale's error logs?

Comment by Mithun [ 2016-05-24 ]

markus makela

2016-05-24 10:14:00   error  : Failed to retrieve users: SELECT command denied to user 'maxscale'@'192.168.0.101' for table 'tables_priv'
2016-05-24 10:14:00   error  : Splitter Service: Unable to load database grant information, MaxScale authentication will proceed without including database permissions. See earlier error messages for user 'maxscale' for more information.

Comment by markus makela [ 2016-05-24 ]

Can you try to add the following grant to the MaxScale user:

GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'192.168.0.101'; 

If that's the only error and you are able to sometimes use it, this is probably unrelated.

Comment by Mithun [ 2016-05-24 ]

markus makela done that, its working as of now. Will update here if any more issues.

Comment by Johan Wikman [ 2016-05-31 ]

Problem seems to have been solved. If re-occurs, please create a new issue.

Generated at Thu Feb 08 04:00:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.