mrjackwills / adsbdb

public api for aircraft, airlines, & flightroutes
https://adsbdb.com
MIT License
111 stars 6 forks source link

[BUG] Rate limiter #5

Closed mrjackwills closed 5 months ago

mrjackwills commented 1 year ago

Describe the bug There is an issue with the rate limiter, where the TTL is reported as 1, and points are reported over 200, but the TTL does not reset correctly

Appears to occur after application has been running for one week

To Reproduce Struggle to replicate, only noticed twice when checking status of site

Expected behavior Rate limits & TTL get reset correctly

Additional context Keep checking the status of the site, and check internal redis database to get the value of the Ratelimiter, in points, and the TTL

amorris13 commented 1 year ago

Not sure if this is the same issue but I've noticed that I'm sometimes being rate limited when I don't think I'm coming close to hitting the documented rate limits of 120/240 requests per minute. My program sends a request for every plane flying overhead (so at most once per minute, but usually only a few times an hour). On busier days, I seem to be rate limited later in the day (and then it is fixed by the next day because there are no planes overnight in Sydney) suggesting that the rate limit is applying on a daily basis, not a per minute basis?

mrjackwills commented 1 year ago

Not sure if this is the same issue but I've noticed that I'm sometimes being rate limited when I don't think I'm coming close to hitting the documented rate limits of 120/240 requests per minute. My program sends a request for every plane flying overhead (so at most once per minute, but usually only a few times an hour). On busier days, I seem to be rate limited later in the day (and then it is fixed by the next day because there are no planes overnight in Sydney) suggesting that the rate limit is applying on a daily basis, not a per minute basis?

I think I might a fix for it on the next release, in the mean time if you think you are being rate limited, try visiting https://www.adsbdb.com, if the current api version and uptime don't display any values, then you are currently rate limited.

EDIT: I have changed the application at api.adsbdb.com to a new, as yet unreleased, version, which should hopefully solve these issues, I'll keep a closer eye on it, but let me know if you have any issues

mrjackwills commented 1 year ago

Bug closed with v0.0.16 update

amorris13 commented 1 year ago

Thankyou. Confirming that I have not experienced any rate limiting in the past few weeks.

mrjackwills commented 1 year ago

hmm, had issues with this again today