摘要:
2006, 'MySQL server has gone away'描述:mysql服务端断开idle过期连接,而客户没有检测重连所以报错。解决:def is_connection_usable(): try: connection.connection.ping() except: return False else: return Truedef do_queue(): while True: if not is_connection_usable(): connection.close(... 阅读全文