server retry logic for production mode