Try to access server 3 times before sending out error message