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

Superset not stopping when I press stop button. #21865

Closed
1 task done
M3gar00 opened this issue Oct 18, 2022 · 23 comments
Closed
1 task done

Superset not stopping when I press stop button. #21865

M3gar00 opened this issue Oct 18, 2022 · 23 comments
Labels
#bug Bug report data:connect:trino Related to Trino

Comments

@M3gar00
Copy link

M3gar00 commented Oct 18, 2022

I'm attempting to run a simple test query:
SELECT count(*) from table_x;

I'm currently sitting at 22:35:59.00 and counting.

I've reset the server multiple times (I'm working on a different problem that has required the server to be re-deployed).

How to reproduce the bug

No clue, this query has worked almost instantaneously in the past.

Expected results

The query to A) run quickly and B) stop when I hit the stop button.

Actual results

The query is still going almost a full day later, and I get an error of Failed at stopping query. z-Bk9XLonv when I click on Stop.

Screenshots

Screen Shot 2022-10-18 at 1 35 52 PM

Environment

  • Chrome Version 106.0.5249.103 (Official Build) (arm64)
  • superset version: 2.0.0
  • any feature flags active:
    FEATURE_FLAGS = {
    "ALERT_REPORTS": True,
    "DASHBOARD_RBAC": True,
    }

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [?] I have reproduced the issue with at least the latest released version of superset.
  • I have found the issue in issue tracker, and there was no resolution posted. Issue: Link

Additional context

I started another query in a tab (Similar to the first), and I recorded the logs from when the query started:
Screen Shot 2022-10-18 at 1 40 27 PM

@M3gar00 M3gar00 added the #bug Bug report label Oct 18, 2022
@eschutho
Copy link
Member

HI, what database are you running the query on? Some databases haven't been enabled yet with stop query functionality.

@M3gar00
Copy link
Author

M3gar00 commented Oct 18, 2022

@eschutho Sorry, I should have included that in my OP. I'm using MySQL.

@phihung
Copy link

phihung commented Nov 8, 2022

I have the same problem with superset + trino.
Even after the trino query was time-out (I even tried restarting trino container), superset UI keeps showing "running".
POST /stop_query results on 422 UNPROCESSABLE ENTITY error.

@eschutho
Copy link
Member

eschutho commented Dec 6, 2022

@M3gar00 Yeah, MySQL should work for this. We'll have to test more on both MySQL and Trino.

@hughhhh
Copy link
Member

hughhhh commented Dec 9, 2022

currently tested this locally on the same build, and I'm able to properly stop the query

Screen.Recording.2022-12-09.at.2.23.07.PM.mov

@lgingerich
Copy link

Hello @eschutho, you mentioned above that some databases haven't been enabled yet with stop query functionality. Has it been enabled for Google BigQuery yet?

I am using Google BigQuery and the stop query functionality isn't working for me, but I want to make sure it's not another issue causing this.

@eschutho
Copy link
Member

eschutho commented Jan 18, 2023

Right now, I see the cancel functionality in mysql, postgres, redshift, snowflake, impala and trino. So, no, I don't see the method built out for BigQuery yet @lgingerich.

@christianxiaobai
Copy link

When I use SQL Lab with Impala as the data source, I often encounter the following error message when I click the stop button during query execution:Failed at stopping query. WUJFsUIaJ

@iabhinavkaundal
Copy link

iabhinavkaundal commented Mar 10, 2023

Hello Team,
We have added Mysql and Postgresql in my machine and we are facing the same issue on "Failed at stopping query. D-pibT97ZN".
Please help
Group 2

@iabhinavkaundal
Copy link

Hello Team, We have added Mysql and Postgresql in my machine and we are facing the same issue on "Failed at stopping query. D-pibT97ZN". Please help Group 2

Please help in this as we are stuck

@eschutho
Copy link
Member

The failed at stopping query error can happen when the query has already finished its execution before the request to stop the execution reached the database. Can you try running a very long query to make sure that that isn't the case?

@eschutho
Copy link
Member

When I use SQL Lab with Impala as the data source, I often encounter the following error message when I click the stop button during query execution:Failed at stopping query. WUJFsUIaJ

Impala stop query was implemented recently in #22635. You can test this out on the 2.1 release.

@MateusCastello
Copy link

I'm having the same problem with superset + trino on Superset 2.1.0

@laserninja
Copy link

For me too the stop from Superset 2.0.1 UI is not propagating to Trino 400. I am getting 200 response on the stop query endpoint in the logs though.
"POST /superset/stop_query/ HTTP/1.1" 200
Even after stoping the query from Superset, I see in the logs that the app tries to get the status on the query
2023-04-24 05:43:56,316:DEBUG:urllib3.connectionpool:https://superset.trino.xxxx:443 "GET /v1/statement/executing/20230424_054324_00045_rv546/y04452f3f81f5c61269e8aa1f82ca9b345ae76c48/30 HTTP/1.1" 200 878

@eschutho
Copy link
Member

ccing @villebro - he mentioned that he can test out Trino.

@villebro
Copy link
Member

Hi, I'm looking into this, and I can indeed confirm that the queries appear to execute regardless of the stop button having been pushed. This may somehow be related to the migration of the query stopper from the legacy view to the v1 API.

@Lucian63
Copy link

Hi @eschutho, we ran into the same issue in Production that "Stop" button doesn't response in v2.1.0 Superset. We are using the "Clickhouse" as the database. Could you help to check whether this is enabled or not? If not, is there any ETA? Appreciate your help in advance.

@rusackas
Copy link
Member

Pinging a few other folks from the DB Rolodex for good measure: @cccs-tom @john-bodley @sujiplr

They all use Trino according to the DB Rolodex, which anyone here can get in on, btw ;)

I haven't looked into the issue at all, but Impala had a similar problem not so long ago, in case this sheds any insight.
https://github.com/apache/superset/pull/22635/files

@rusackas rusackas added the data:connect:trino Related to Trino label Jun 26, 2023
@villebro
Copy link
Member

Following up here - I looked into this but I wasn't able to figure out what's going wrong. The problem is the related code paths are very convoluted right now, and there's a lot of room for improvement. So I can definitely work on this and clean it up some, but I'm not sure when I'll be able to do so (I don't want to set unrealistic expectations). So if someone wants to pick this up before then and needs help, let me know so I can walk you through what I'd personally do to fix this.

@eschutho
Copy link
Member

Hi @eschutho, we ran into the same issue in Production that "Stop" button doesn't response in v2.1.0 Superset. We are using the "Clickhouse" as the database. Could you help to check whether this is enabled or not? If not, is there any ETA? Appreciate your help in advance.

Hi @Lucian63, stop query functionality for clickhouse has not been implemented yet. We're open to PRs though!

@shubhamverma6594
Copy link

Hi @eschutho @Lucian63, stop query functionality for Bigquery has not been implemented yet

@hcai
Copy link

hcai commented Dec 13, 2023

We use MySql and Superset 3.0.2, the stop button only works if they queries are executed in synchronous mode

@rusackas
Copy link
Member

Closing this since it's a confluence of databases being reported (some have been fixed, some maybe not), and it's on a no-longer-supported version of Superset, and it's been stale for upward of 6 months. If anyone is still facing these issues, please post a new Issue with a single database and updated context. Thanks for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report data:connect:trino Related to Trino
Projects
None yet
Development

No branches or pull requests