add server state and delete MAX Retry because if the server is offline, task queue need to execute in loop.