8000 StripeRateLimitError Triggered by Actions in Cart and on Payment Page · Issue #35 · yournextstore/yournextstore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

StripeRateLimitError Triggered by Actions in Cart and on Payment Page #35

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

Open
signature-development opened this issue Sep 3, 2024 · 3 comments

Comments

@signature-development
Copy link

I’ve encountered an issue related to the Stripe API while testing the YourNextStore project both locally and on the demo website.

Steps to Reproduce:

  1. Add around 10 different products to the cart.
  2. Proceed to the payment page.
  3. There’s a significant chance that you will encounter the “StripeRateLimitError” from the Stripe API.
  4. When this error occurs, the user is presented with an “Ooops, something went wrong!” message.

Additionally, this error can also occur on the cart page if a user rapidly clicks the + button to increase the quantity of a product.

Concerns:

  • If around 5-10 users are using the shop simultaneously and performing similar operations, the likelihood of encountering this error increases.
  • This issue could severely impact the user experience, especially during peak usage times.

Additional Information:

  • This issue was reproduced on both the local development environment and the demo website of YourNextStore.
  • It would be helpful to investigate what happens under more substantial load (e.g., when 5-10 users are performing these actions simultaneously).
@mattyx97
Copy link
mattyx97 commented Sep 4, 2024

While we wait for someone with more specific knowledge to weigh in, I wanted to share some initial thoughts. Based on my understanding and after reviewing the documentation, it seems that the rate limits in the "test" environment are indeed more restrictive compared to the "live" environment. This suggests that the issue you're encountering may not necessarily be a problem in production.

For more details, you can refer to Stripe's rate limit documentation: https://docs.stripe.com/rate-limits.

Let's wait and see if someone can provide a more definitive answer.

@AlexKehl
Copy link
AlexKehl commented Sep 4, 2024

From docs.stripe:
Live mode: 100 read operations and 100 write operations
Test mode: 25 read operations and 25 write operations

The application would have 1 stripe API key shared across all requests.
If the problem can already occur with 1 user in test environment then it means that it could occur for 4 users in live environment...

I don't really get why there are so many requests to stripe being made. There is the "magical" 'commerce-kit' npm package where one cannot observe what it does exactly. Does it cache the fetched cart for example? It looks like it does not...

@zaiste
Copy link
Contributor
zaiste commented Sep 16, 2024

@signature-development We’ve made some changes, and these issues should happen less often, especially in the live environment. Could you please check on your side?

At the same time, we are reorganizing the cart architecture to handle multiple operatiosn happening at the same time when many users are using the website.

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

4 participants
0