handle nginx upstream retries