The following MySQL settings should be revised.
1. MySQL server timed out and cancelled the connection. How to overcome it:
The wait_timeout variable represents the amount of time that MySQL will wait before killing an idle connection. Try to increase its value in your configuration file my.cnf. Finally, MySQL server should be restarted.
2. Server dropped a wrong or too large block of data.
If a packet sent to MySQL Server is too large this error can occur. MySQL decides that something wrong has happened and interrupts connection immediately. Try to increase the value of max_allowed_packet in my.cnf to eliminate that problem.