摘要: 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(... 阅读全文
posted @ 2014-03-01 23:30 海鸟 阅读(250) 评论(0) 推荐(0) 编辑