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

Feature Request: Time out long running queries #594

Open
rak3-sh opened this issue May 22, 2024 · 1 comment
Open

Feature Request: Time out long running queries #594

rak3-sh opened this issue May 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@rak3-sh
Copy link
Contributor

rak3-sh commented May 22, 2024

There is a --timeout option that can be passed to the "database analyze" step but it is not an effective way to limit the total amount of time the query evaluation can take (as mentioned already). Is it possible to have a timeout option that can prevent a query to run beyond a user configured time limit? This would greatly help in situations where users are blocked by long running queries.

@knewbury01 knewbury01 self-assigned this May 28, 2024
@knewbury01
Copy link
Contributor

Hey @rak3-sh ! thanks for the issue,

Unfortunately there currently isnt a CodeQL CLI flag to be able to say "one query should timeout after X minutes",

Because we evaluate all of a set of queries in parallel, they all start execution at the same time. However, not all of the queries are worked on most of the time meaning that the timeout flag is about the same as a timeout for the whole analyse call. A hypothetical CPU-time limiting flag would work a bit better but would end up with a similar lack of guarantee (on any individual query) because sharing means it is a bit awkward which query the work can be attributed to. Plus parallelism means that threading makes this weird. Practically most of the time the problem is in a library which means a global timeout is better as it can account for everything (and that is why we prefer to use an Actions level timeout on a job rather than implementing one in the CodeQL CLI)

@ravikprasad ravikprasad added the enhancement New feature or request label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants