Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate Limit Exceeded When Uploading Large Number of Files #1036

Open
michael-srx opened this issue Apr 11, 2024 · 0 comments
Open

Rate Limit Exceeded When Uploading Large Number of Files #1036

michael-srx opened this issue Apr 11, 2024 · 0 comments

Comments

@michael-srx
Copy link

Description

We are experiencing a rate limit issue with hs upload when used in a GitHub Action environment to handle a large number of files. The network speed in this context is significantly higher than when performed locally, leading to a Rate limit exceeded for creating files. Retry in 1 minute. error. This seems to be caused by hitting the rate limit of the underlying API endpoint.

Steps to Reproduce

  1. Set up a GitHub Action using HubSpot's CLI tool to upload a large batch of files.
  2. Observe that the action fails with the error: Rate limit exceeded for creating files. Retry in 1 minute.

Expected Behavior

The CLI tool should handle API rate limits with built-in rate limiting or a retry mechanism to manage bulk uploads without exceeding the API's limits.

Actual Behavior

The CLI tool fails and stops the upload process when the API's rate limit is exceeded.

Workaround

We have found a workaround by limiting the network speed using trickle:

trickle -u 2560 hs upload ...

This approach reduces the rate at which requests are made, thereby avoiding the rate limit error, but it is not an ideal solution.

Suggested Fix

It would be beneficial for the CLI tool to include an integrated rate limiter or a more sophisticated error handling mechanism that can dynamically adjust the request rate based on the API's feedback or predefined thresholds.

HubSpot CLI version: 5.2.0
Node.js version: 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant