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

redash-migrate users "could not create user: probably this user already exists but is not present in meta.json" #73

Open
mvsleak opened this issue Oct 13, 2021 · 4 comments
Assignees

Comments

@mvsleak
Copy link
Contributor

mvsleak commented Oct 13, 2021

Under the hood, this is the full error message including the exception:

Could not create user: probably this user already exists but is not present in meta.json 429 Client Error: TOO MANY REQUESTS for url: http://13.228.231.8//api/users?no_invite=1
   importing: 365880

I can see this kind of error was expected and this comment shows how this can be fixed:
#23 (comment)

However, even after setting RATELIMIT_ENABLED=False in redash (in /opt/redash/env for AWS AMI) I am still getting rate limited with the same message. What did change, however, is how many calls succeeded before getting rate limited. Before disabling RATELIMIT_ENABLED rate limit would kick in after creating 50 users, and after, it would start after creating 100 users.

@susodapop susodapop self-assigned this Oct 13, 2021
@shibacow
Copy link

I faced the same problem.I tried REDASH_RATELIMIT_ENABLED=false in /opt/redash/env . It worked as expected.

https://github.com/getredash/redash/blob/9c928bd1d3f00c994f37e1a87edaddd646259f56/redash/settings/__init__.py#L310

According to the source code, the environment variable to be set seems to be REDASH_RATELIMIT_ENABLED.

@susodapop
Copy link
Collaborator

@shibacow is correct. The environment variable is called REDASH_RATELIMIT_ENABLED. This is then mapped to a Python constant called RATELIMIT_ENABLED. If you set an environment variable without REDASH_ appended to it, I would not expect this to have any effect.

@mvsleak Can you can confirm?

@susodapop
Copy link
Collaborator

Would appreciate a review on #81 from either of you 👍

@mvsleak
Copy link
Contributor Author

mvsleak commented Nov 8, 2021

I confirmed using REDASH_RATELIMIT_ENABLED fixes the issue. Thanks a lot!

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

3 participants