Skip to content

Timeout does not stop blocked query execution in query profiling script #134

@schivmeister

Description

@schivmeister

P1 Badge Timeout does not stop blocked query execution

In run_queries the timeout logic cancels the Future but the surrounding ThreadPoolExecutor context manager still calls shutdown(wait=True) when leaving the with block. Because Python threads cannot be forcefully terminated, a hung execute_query keeps running and the context exit waits for it to finish, so the CLI remains blocked for the full query duration (or indefinitely) even though a TIMEOUT status is recorded. This defeats the --timeout option when a SPARQL request stalls or the server is unavailable. Consider shutting down the executor with wait=False, reusing a long-lived executor, or moving the execution to a separate process that can be terminated.

Useful? React with 👍 / 👎.

Originally posted by @chatgpt-codex-connector[bot] in #129 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions