wrapping access to d/b connection with try-exception to avoid mysql time out error