title: MySQL Server Error -> server gone away and error while sending query packet
body: <p>Today I have encountered a mysql server error... this actually happened twice... before was last week...</p>
  
  <pre><code>[29-Jan-2018 01:51:11 UTC] PHP Warning:  mysqli_query(): Error reading result set's header in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:10 UTC] PHP Warning:  mysqli_query(): MySQL server has gone away in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  mysqli_query(): Error reading result set's header in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:10 UTC] PHP Warning:  mysqli_query(): MySQL server has gone away in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  mysqli_query(): Error reading result set's header in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  mysqli_query(): MySQL server has gone away in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  mysqli_query(): Error reading result set's header in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:10 UTC] PHP Warning:  mysqli_query(): MySQL server has gone away in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  mysqli_query(): Error reading result set's header in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7546 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7609 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7553 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7579 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7607 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7593 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7524 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  [29-Jan-2018 01:51:11 UTC] PHP Warning:  Error while sending QUERY packet. PID=7601 in /opt/lampp/htdocs/wordpress/wp-includes/wp-db.php on line 1924
  </code></pre>
  
  <p>My temporary solution for this was Restarting mysql server service... it works for now...</p>
  
  <p>Can anyone tell me was possible triggers this or how can I possibly fix this?</p>
  
  <p>P.S I have also tried increasing in my.cnf -> from max_allowed_packet=16M to max_allowed_packet=128M... I thought it fixed it, but it came back</p>