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

Data tests can cause "user query limit" issue if queries queue for over 600 seconds. #673

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

DylanBaker
Copy link
Collaborator

Change description

With the recent async changes, we now run all data tests at the same time.

This is from the Looker docs:

Per-user query limit and timeout: To prevent any single user from filling up the Looker query queue, each user has a maximum number of allowed concurrent queries and a corresponding queue timeout. By default, each user can run a maximum of 15 concurrent queries, and the timeout for queries queued due to this limit is 600 seconds.

Some organisaitons have a large number of tests, many of which take a while to run. As a result of this, some organisations are getting errors related to the user query limit when the data test queries take a long time.

This PR sets a concurrency limit of 15 to the data tests.

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

Closes #671

Checklists

Security

  • Security impact of change has been considered
  • Code follows security best practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer

@DylanBaker DylanBaker added the Bug Something isn't working label Jan 3, 2023
@DylanBaker DylanBaker changed the title remove redundant variable Data tests can cause "user query limit" issue if queries queue for over 600 seconds. Jan 3, 2023
Copy link
Collaborator

@joshtemple joshtemple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

I wonder, should we set the SQL validator's query concurrency to 15 by default as well? If Looker is capping the per-user query concurrency at 15, I'm not sure it makes sense to allow users to set concurrency any higher, or even to configure that value. From my testing with async, I struggled to get 20+ queries running simultaneously anyway.

},
}
query_slot = asyncio.Semaphore(
15
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's define this 15 as a constant at the top of the module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

@DylanBaker DylanBaker merged commit 67d941d into master Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data tests can cause "user query limit" issue if queries queue for over 600 seconds.
2 participants