Add in checkConnectionOnBorrow: true to config file to prevent connection problems when idle overnight