title: how to troubleshoot aborted connection mysql?
body: <p>I keep getting this in my mysql error log.</p>
  
  <pre><code>5 [Note] Aborted connection 5 to db: 'dbname' user: 'dbuser' host: 'localhost' (Got an error reading communication packets)
  </code></pre>
  
  <p>Combed trough the php code and made sure that am calling mysqli->close on the db resource when my script is about to finish.</p>
  
  <p>My project stack: apache2.4 with php-fpm7.2 and mysql 5.7.25 on ubuntu 18.10.</p>
  
  <p>Is there any way i can get more insight into this issue?</p>
  
  <p>Just checked firewall but it is Inactive</p>
  
  <pre><code>sudo ufw status
  Status: inactive
  </code></pre>
  
  <p>I found the issue for this. I was not clearing all results before closing the db connection so i just clear all results explicitly using php then i make the db->close. The log lines dissapeared from /var/log/mysql/error.log.</p>