|This response to a query has four possible causes ...
1 the server crashed
net_read_timeout is shorter than the time the query took. If that's so, increasing it—or better, optimising the query—will fix the problem
connect_timeout is shorter than the time taken to connect. If that's so, show global status like 'Aborted_connects' will increment by 1 on each connection attempt, and increasing connect_timeout will fix the problem
max_packet_size is smaller than blobs asked for by the query. If so, you should see a packet-too-large error, and increasing packet size should fix the problem—unless you are trying to send packets larger than the MySQL hard limit of 1GB, in which case you'll need to chunk those
Last updated 10 Dec 2019