#lukas.giniotis-rate-limit

1 messages · Page 1 of 1 (latest)

molten shard
#

Hi there 👋 if your requests are being limited then they'll receive 429 status codes in their response.

You can look in the dashboard at your account's logs and filter to failed requests to look for requests that were rate limited:
https://dashboard.stripe.com/test/logs?success=false&method[]=post&method[]=delete&direction[]=self&direction[]=connect_in

It's also worth noting that if you were load testing in test mode then the results you see may not be indicative of live mode as we have lower rate limits in test mode and discourage load testing within it.
https://stripe.com/docs/rate-limits#load-testing

sour badger
#

Thanks. But rather than calls to APIs that returns 429, some events are not going through to the webhooks and they are showing up as having no request or response bodies. Can that happen because of rate limiter?

molten shard
#

Not that I'm aware of, it looks like we might be having a problem reaching your endpoint.

sour badger
#

It does happen only during the load testing though. Now that they are not running, I am able to make a purchase and hit the endpoint without issue

molten shard
#

Can you provide the ID of one of the events that isn't showing a request or response body?

sour badger
#

evt_3KUABLFDlhF015OL1PN5sDsF

molten shard
#

Thank you, hm, I'm seeing that this event went to 3 different endpoints and it seems to have failed for all of them. Taking a closer look.

sour badger
#

We have three non-prod environments for one Stripe test environment, so going to three webhooks is expected (one for each env). It's supposed to lookup the database for relevant order and fail for the two that are not from the correct environment. However during load tests on one of the environments, some of the events fail for all environments, regardless if it was raised on the environment-under-load or not.

#

Thanks for the help

nova briar
#

You should probably set up separate account for these environments to have separate webhook configurations

#

or otherwise manage the "failure for wrong environment" internally and respond with successful delivery anyways to avoid your endpoints being disabled for too many failures

#

Can you share specific events and endpoints that failed unexpectedly?

sour badger
#

This event failed unexpectedly for dev environment (failed expectedly for test and preprod): evt_3KU9W9FDlhF015OL1gt8b6Is . It says under Http status code for it that it was 'Not attempted due to poor endpoint health'

#

I assume that's our problem right there. It can skip attempting to deliver the event if the endpoint is 'in poor health', which happens because of 'expected failures' during load-test on other environment. Can you confirm that's the case? Then we will need to manage this 'failure for wrong environment' somehow and this shouldn't affect Stripe live, as we have one webhook for one environment there.

nova briar
#

Yes, we disable endpoint with high failure rates: