title: I keep losing connection with the MySQL server after some hours
body: <p>I have a python script which works as a counter for a production line that it basically records a product has passed through the sensor's beam. Aside from this, the code has two threads that works as timers for when the MySQL connection is done. Which is one time every minute and once an hour. The problem is that I keep getting network errors, such as</p>
  <p>PuTTY Fatal Error: Network Error: Software caused connection abort. And
  mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL sever on &quot;IP:port&quot; (101 Network is unreachable)</p>
  <p>Which rises the question on why it displays that message? Since the Network is up and available, this happens after some hours after running, the script is supposed to run throughout all day.</p>