Updated on 2023-02-27 GMT+08:00

Specifying Retry Count

The cli-retry-count option specifies the number of connection attempts. The system retries automatically if a request times out due to a network connection problem. The value range of --cli-retry-count is 0 to 5, and the default value is 0.

  • If a request fails due to abnormal network connection, the following information is displayed on KooCLI:
    hcloud RDS ListInstances --cli-region="eu-west-101" --Content-Type="application/json" --project_id="2cc60****************caefa5019ef" --cli-retry-count=3
    [NETWORK_ERROR] Connection timed out 4 consecutive times (reconnection attempts: 3). Check network connectivity.
  • If the network connection is normal, the following information is displayed:
    hcloud RDS ListInstances --cli-region="eu-west-101" --Content-Type="application/json" --project_id="2cc60****************caefa5019ef" --cli-retry-count=3
    {
      "instances": [],
      "total_count": 0
    }

    Setting the retry count with --cli-retry-count may cause idempotence and cyclic API calls. Exercise caution when using this option for resource creation APIs.