Skip to content

Cannot cancel long running Query. #18837

@nycgavin

Description

@nycgavin
  • MSSQL Extension Version: 1.28.0
  • VSCode Version: 1.97.2
  • OS Version: Mac sonoma 14.5
  • M1 chip
  • MS Sql server 2019

Steps to Reproduce:

  1. run this query on a new tab: Select * from ... join [Linked Server] --this query runs for a long time
  2. the query starts running, but the Query History says "No Queries Available" and the cancel button is hidden
  3. The bottom of VS code says Executing Query. (P.S. if you click on the disconnect button at this point, the bottom says canceling query, but it will continue spinning for the next x minutes)
  4. if you open another query tab and try to execute a different query, it opens a prompt and lets you choose the connection, but after you choose it, it just says testing profile on the bottom right corner but doesn't do anything.
  5. When the first query finished executing (after 5 minutes, another error shows up that says: mssql: A query is already running for this editor session. Please cancel this query or wait for its completion.)

Activity

nycgavin

nycgavin commented on Feb 24, 2025

@nycgavin
Author

Being able to cancel a long running Query should be part of the core requirement. If even this doesn't work...

match-gabeflores

match-gabeflores commented on Feb 25, 2025

@match-gabeflores
Contributor

I've also started to encounter this occasionally. I have to restart VSCode as a solution. I've also seen this more often on Cursor ide (not sure where the source of the bug is - cursor or the extension)

self-assigned this
on Feb 27, 2025
added this to the March Release 2025 milestone on Feb 27, 2025
cssuh

cssuh commented on Mar 11, 2025

@cssuh
Contributor

Hi @nycgavin & @match-gabeflores just to clarify, I have two questions:

  1. Are you saying the cancel button (seen in screenshot below) is hidden while the query is still running?
  2. Do you see the cancel button right after starting the query execution, and it disappears later on, or is it never there in the first place?

Image

20 remaining items

assigned and unassigned on May 27, 2025
sggoose

sggoose commented on Jul 24, 2025

@sggoose

Could we get an update on this? I see the pull request to close but this keeps getting pushed to further milestones?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

    Participants

    @match-gabeflores@kburtram@Benjin@nycgavin@aasimkhan30

    Issue actions

      Cannot cancel long running Query. · Issue #18837 · microsoft/vscode-mssql