0

I am trying to implement a HA system using Spider Engine on MariaDB and MySQL. I have configured the system and everything is running fine if I enter a small data through spider node.

But when I enter huge data it shows the following error:

Error Code: 2013. Lost connection to MySQL server during query

My spider node has mariadb , monitor node has mariadb and data nodes have MySQL.

Thank You in advance!

jarlh
  • 42,561
  • 8
  • 45
  • 63
  • Possible duplicate of [Error Code: 2013. Lost connection to MySQL server during query](http://stackoverflow.com/questions/10563619/error-code-2013-lost-connection-to-mysql-server-during-query) – Jehy Jun 01 '16 at 14:11
  • Its for Spider Engine and I have already tried those methods. @Jehy – Shantanu Bansal Jun 03 '16 at 05:00
  • Spider Engine does not matter. All that matters is your mysql setup. Did you specify `max_allowed_packet`,`net_write_timeout` and `net_read_timeout` in mysql settings? – Jehy Jun 03 '16 at 09:10
  • I have tried all these things but its still the same!! @Jehy – Shantanu Bansal Jun 06 '16 at 05:31
  • How long did the query run before dying? `SHOW VARIABLES LIKE '%timeout%';` – Rick James Jun 07 '16 at 15:06
  • @RickJames I called a procedure which ran only for 11 or less seconds executing 65 to 75 Insert queris – Shantanu Bansal Jun 08 '16 at 05:53

1 Answers1

1

In general, this error is related to a network issue or a configuration issue.

In case you can’t see any errors in the network, you can check the values of the following variables in MySQL:

connect_timeout

net_read_timeout

max_allowed_packet

You can run this command to get the current values:

$ SHOW GLOBAL VARIABLES LIKE '%variable%';

Replace “variable“ with the name of the variable that you’re checking.

You can try to increase them and see if it fixes the issue. It’s hard to say what value should you use without more information, but I’d recommend duplicating them and seeing if it works.

Severalnines
  • 106
  • 5