Bug #89100 Copy server-client failed A non-blocking socket operation could no be completed
Submitted: 4 Jan 2018 1:22 Modified: 2 Apr 2018 12:52
Reporter: Saverio Loiacono Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Severity:S2 (Serious)
Version:2.1.4 OS:Microsoft Windows (2016)
Assigned to: Bogdan Kecman CPU Architecture:Any

[4 Jan 2018 1:22] Saverio Loiacono
Description:
I have an error using MySQL Server Routing, below my environment:
One Web Server with:
	- Windows 2016
	- IIS 10
	- WordPress 4.8.3
	- PHP 7.1.11
	- MySQL Router 2.1.4 

Three DB Server with a MySQL instance for each server and InnoDB Cluster. One instance is R/W the other two are R/O:
	- Windows 2016
	- MySQL CE 5.7.20

When i configure the FrontEnd server to use MySQL Router 2.1.4 i, often receive the error below:

From PHP error log:
	php[6036]
	PHP Warning:  mysqli_query(): Error reading result set's header in ....\wp-includes\wp-db.php on line 1942
	php[6036]
	PHP Warning:  mysqli_query(): MySQL server has gone away in ....\wp-includes\wp-db.php on line 1942
	php[6036]
	PHP Warning:  mysqli_query(): (00000/0):  in ....\wp-includes\wp-db.php on line 1942
	php[6036]
	PHP Warning:  Empty row packet body in ....\wp-includes\wp-db.php on line 1942

From mysqlrouter.log:
	DEBUG   [f08] Write error: SystemError: A non-blocking socket operation could not be completed immediately.
	DEBUG   [954] Write error: SystemError: A non-blocking socket operation could not be completed immediately.
	DEBUG   [f08] [routing:MySQLCLU_default_rw] Routing stopped (up:376143b;down:385b) Copy server-client failed: SystemError: A non-blocking socket operation could not be completed immediately.
	DEBUG   [954] [routing:MySQLCLU_default_rw] Routing stopped (up:384175b;down:385b) Copy server-client failed: SystemError: A non-blocking socket operation could not be completed immediately.

From MySQL Server.err
	[Note] Aborted connection 2140 to db: 'xxxxxxxx' user: 'xxxxxxxx' host: 'xxxxxxxx' (Got an error writing communication packets)
	[Note] Aborted connection 2141 to db: 'xxxxxxxx' user: 'xxxxxxxx' host: 'xxxxxxxx' (Got an error writing communication packets)

If i configure the FrontEnd server to use directly the r/w MySQL instance all work correctly.

How i can solve the problem ?

How to repeat:
The problem can be reproduced with a simple php page with a query. I use a table with two columns:
- varchar
- longtext
and 500 rows. The table size is about 1.5MB
[12 Feb 2018 16:35] Bogdan Kecman
Hi,

I can't reproduce this but it looks a lot like bug #88108.

Do you have a problem *every time* you try to read a big table with big result set? What are your configs for mysql's and router?

Is this running on bare metal or you are running it inside some vm's? Azure by any chance?

thanks
Bogdan
[3 Mar 2018 22:49] Saverio Loiacono
Configuratio File My SQL Server 1

Attachment: my-testdb01.ini (application/octet-stream, text), 13.94 KiB.

[3 Mar 2018 22:49] Saverio Loiacono
Configuratio File My SQL Server 1

Attachment: my-testdb01.ini (application/octet-stream, text), 13.94 KiB.

[3 Mar 2018 22:50] Saverio Loiacono
Configuratio File My SQL Server 2

Attachment: my-testdb02.ini (application/octet-stream, text), 13.93 KiB.

[3 Mar 2018 22:50] Saverio Loiacono
Configuratio File My SQL Server 3

Attachment: my-testdb03.ini (application/octet-stream, text), 13.93 KiB.

[3 Mar 2018 22:51] Saverio Loiacono
Configuratio File My SQL Router

Attachment: mysqlrouter.conf (application/octet-stream, text), 1.28 KiB.

[3 Mar 2018 22:53] Saverio Loiacono
Hi Bogdan, I'm sorry for the delay, the error occurs randomly. I'm running MySQL Serer e My SQL Router in a VM on Openstack Cloud platform. I attach 
the configuration files.

Regards
Saverio
[5 Mar 2018 9:48] Bogdan Kecman
Hi,

Thanks for the update, I'll try running this on my vm's today to see if I can reproduce it so we'll see.

all best
Bogdan
[1 Apr 2018 21:13] Saverio Loiacono
Hi Bogdan, i installed My SQL Router 2.1.6 and the problem no longer occurred.

Thanks
Saverio
[2 Apr 2018 12:52] Bogdan Kecman
Hi,
Thanks for the update, so the bug is solved already :)
all best
Bogdan