Box java sdk - too many requests

回答済み
新規投稿

コメント

4件のコメント

  • carycheng77

    Hey  ,

     

    The Java SDK does retry for cases of 5XX and 429. How we attempt retry is with exponential backoff with randomized jitter to negate too many requests firing off again at once with the retry.

     

    You can see the logic for this backoff here.

     

    The reason for using this type of backoff strategy is to make sure that the multitude of requests that could potentially be sent gets smoothed over a period of time on the retry and not too many of the requests  are being sent over concurrently again.

     

    The retry time is usually denoted in milliseconds.

     

    Let us know if this is helpful and if you have any other questions please reach out. And for SDK specific issues please feel free to file a request here.

    0
    コメントアクション パーマリンク
  • Bharath_N_V

    Can you please inform us how many times it'll we be retried before giving up?

    0
    コメントアクション パーマリンク
  • carycheng77

    Hey ,

     

    The request will be retried 3 times before stopping.

    0
    コメントアクション パーマリンク
  • smartduck

    Hi Bharath N V,

     

    You can set the setMaxRequestAttempts and setConnectTimeout on the BoxAPIConnection to get better results.

     

    Example:

    BoxAPIConnection api;

    api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig);
    api.setMaxRequestAttempts(20); // number of attempts
    api.setConnectTimeout(10000); // time out in milliseconds

     

    I have the same issue.

     

    Regards,

     

    Marcel

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。