add retry when failed to connect web server