Skip to content
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

Rate limits problem #127

Closed
dmolina-ot opened this issue Mar 19, 2015 · 2 comments
Closed

Rate limits problem #127

dmolina-ot opened this issue Mar 19, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@dmolina-ot
Copy link

If you add a custom rate limit to an user and then delete it, the API Backend rate limit don't work to this user.

It something more difficult. You must delete first the concrete rate limit, and then change the Rate Limit combobox from Custom rate limits to Default rate limits. Checking MongoDB api_users collection, you can find that rate_limit_mode is null, but you can find also a empty rate_limits array. This is the problem!! If you delete this empty array, the API Backend rate limit works again.

@GUI
Copy link
Member

GUI commented Mar 19, 2015

@dmolina-ot: Is the API Backend's rate limit setup to be "Unlimited requests"? Or does the API Backend also have a custom rate limit defined?

If the API backend in question is setup with an unlimited rate limit, then I think in an odd coincidence we also just spotted this bug yesterday and fixed it in master: 18F/api.data.gov#201 This fix will be part of the v0.8 release.

However, if the API backend is not using an unlimited rate limit, then can you let me know how it is setup? I've played around with other combinations of custom rate limit settings and haven't been able to reproduce this same issue.

@GUI GUI added the bug label Mar 19, 2015
@GUI GUI added this to the v0.8 milestone Mar 19, 2015
@GUI GUI self-assigned this Mar 19, 2015
@GUI
Copy link
Member

GUI commented Mar 19, 2015

Ah, never mind, I see what you're talking about and how to reproduce it. It's actually very similar to the other rate limiting issue we fixed yesterday, but slightly different. The key to reproducing this was to save a user with 1 or more custom rate limits defined, and then as a separate action edit that user to remove the rate limits, but while keeping the "Rate limit" menu selected as "Custom rate limit". If you switched it immediately back to "Default rate limits" and saved then I don't think this happened, only if you first saved the record one time while "Custom rate limit" was still selected but all the rate limits had been removed.

In any case, this should be fixed in master by NREL/api-umbrella-gatekeeper@6785c60 This will be part of the upcoming v0.8 release.

Thank you very much for brining this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants