Closed pikant closed 11 months ago
In fact, my local API had rate limiting enabled. Saloon automatically picked up this information and threw the exception. I was able to fix the problem simply by enabling retries on the connector.
Glad you were able to sort the issue out! 🤠
Problem
I have been tinkering around with the Rate Limit Handler.
With only one worker, it works perfectly fine.
With multiple works, Saloon starts doing great. However, after a minute or so, having 2-5 works running, Saloon throws many
RateLimitReachedException
, although I have advised it to sleep if the limit is reached. This leads to all workers failing:https://flareapp.io/share/Lm8qv2kP
My Question: Is there a way to make the Rate Limit Handler ready for a multi-worker setup? Or am I missing something?
My Setup
For my Saloon app, I am using a fresh Laravel 10 installation, created today. Here are the classes in use:
Connector:
Request:
Test Command:
To simulate multiple works, I am just spinning up multiple command line tabs. For the Cache, I am using Redis locally.
For the API, I am using also a fresh installation of Laravel that has no rate limits and returns just "Hello Word" as JSON.