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

HTTP interface: kill queries after disconnect. #1403

Closed
filimonov opened this issue Oct 25, 2017 · 2 comments · Fixed by #4213
Closed

HTTP interface: kill queries after disconnect. #1403

filimonov opened this issue Oct 25, 2017 · 2 comments · Fixed by #4213
Labels

Comments

@filimonov
Copy link
Contributor

filimonov commented Oct 25, 2017

If you will just close the HTTP connection with lasting query, the execution of that query is not stopped.

May be for DDL queries that bahaviour can be considered as acceptable, but for usual SELECTs - continuing the query execution after disconnect - is only wasting of server resources.

I know that there is replace_running_query and KILL QUERY but it not always possible (for example if client just died, and server have a lot of clients, and can't distinguish which are active and which - not) and requires some extra actions.

I think that for SELECTs you should check if connection is still active and kill / replace the query if connection was closed by the client / timeout, for DDLs / INSERTs - that behaviour probably should be configurable.

@ludv1x ludv1x added the feature label Oct 25, 2017
@valyala
Copy link

valyala commented Nov 8, 2017

@filimonov , try using chproxy. It must kill the query immediately after the client closes http connection.

@YuriyNasretdinov
Copy link

@filimonov , try using chproxy. It must kill the query immediately after the client closes http connection.

Using proxy is of course an option but it seems that much more users would benefit from the feature if it was implemented in the server itself.

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

Successfully merging a pull request may close this issue.

4 participants