In my previous post I mentioned you might need to increase net_write_timeout to avoid connection being aborted and now I think I should have better explained that.
MySQL uses a lot of different timeout variables at different
stages. For example when connection is just being established
connect_timeout is used. When server waits for
another query to be sent to it
wait_timeout
(or interactive_timeout for applications which
specified they are interactive during connection). This value is
rather large as it is rather typical for some applications to
have long delays between queries.
If query is being read or result set is being sent back, much shorter net_read_timeout and net_write_timeout are used.
…
[Read more]