Edgewall Software

Ticket #3645: mysql_ping.patch

File mysql_ping.patch, 390 bytes (added by Scott MacVicar <scott@…>, 5 years ago)

Patch to ping a MySQL connection from a pool before using it.

  • pool.py

     
    5555    critical times because of a timeout on the Connection. 
    5656    """ 
    5757    try: 
     58        if hasattr(cnx, 'ping'): 
     59            cnx.ping() 
    5860        cnx.rollback() # resets the connection 
    5961        return True 
    6062    except Exception: