Better error handling for redis connection

When Redis connection is lost, don't crash the application.