Too many requests during Product fetching

Topic summary

A developer is experiencing 429 Too Many Requests errors when fetching product and collection lists from the Shopify API via their server, while identical requests work fine locally.

Configuration details:

  • Using the shopify-api-node npm package
  • Settings: 2000 request limit, bucket size of 2, 1ms request delay, 60-second timeout
  • Code snippet provided shows ShopifyAPI initialization with autoLimit parameters

Key questions raised:

  • Why does the same code behave differently between local and server environments?
  • Are there specific server configurations or best practices to avoid rate-limiting when accessing Shopify’s API from production servers?
  • Has anyone encountered similar environment-specific rate limit issues?

The developer is seeking guidance on troubleshooting this discrepancy and resolving the server-side rate limiting problem.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hello,

I hope this message finds you well. I am currently encountering an issue when making requests to the Shopify API from my server fetching the product list and collection list. Surprisingly, the same requests work perfectly fine from my local machine. Here are the details of my situation:

Problem:

I am consistently receiving a 429 Too Many Requests error when attempting to access the Shopify API from my server. However, the same requests work seamlessly from my local machine without any rate-limiting issues. Code:

const REQUEST_TIME_DELAY = 1;
const SHOPIFY_REQUEST_LIMIT =2000;
const BUCKET_SIZE = 20;
const shopifyApi = new ShopifyApi({
shopName: shopDomain,
accessToken,
timeout: 600000,
autoLimit: {
calls: SHOPIFY_REQUEST_LIMIT,
interval: REQUEST_TIME_DELAY,
bucketSize: BUCKET_SIZE
}
});

I am using shopify-api-node npm pacakge manager.

Has anyone else experienced a similar issue when accessing the Shopify API from a server? Are there specific considerations or best practices for server configurations to avoid rate-limiting problems with Shopify? Any insights, suggestions, or guidance on how to troubleshoot and resolve this issue would be greatly appreciated. Thank you in advance for your assistance!

Best regards,