mysql timeout handler