Killing a running statement, need assistance

Hello,

I have a running statement running since yesterday, please see picture:

The client was setup to timeout anything greater than 75 seconds. I dont know why couchbase is still running this. I tried killing it, but does not work.

See here:

SELECT * FROM system:active_requests

[
{
“active_requests”: {
“ElapsedTime”: “13.32024476s”,
“ExecutionTime”: “13.320191917s”,
“PhaseCounts”: {
“Fetch”: 81392,
“IndexScan”: 81810
},
“PhaseOperators”: {
“Fetch”: 1,
“IndexScan”: 1
},
“RequestId”: “02c2d183-1a01-4909-a9ca-ff8d2f9a365e”,
“RequestTime”: “2016-10-25 13:31:04.921685362 +0000 UTC”,
“State”: “running”,
“Statement”: “select recipientId,productKeyfrom oltp-json where type = “messaging_subscription” and channelName = “jukebox.DEADBEEF””
}
},
{
“active_requests”: {
“ClientContextID”: “9b121f5c-8bf9-4c41-a697-b0903d721b94”,
“ElapsedTime”: “1.183503ms”,
“ExecutionTime”: “1.122729ms”,
“PhaseCounts”: {
“PrimaryScan”: 4
},
“PhaseOperators”: {
“Fetch”: 1,
“PrimaryScan”: 1
},
“RequestId”: “e9e18ff8-0b6d-483b-a42f-f672156fb51b”,
“RequestTime”: “2016-10-25 13:31:18.240765241 +0000 UTC”,
“State”: “running”,
“Statement”: “SELECT * FROM system:active_requests”
}
}
]

delete from system:active_requests where RequestId = “3fa7281b-d3db-4736-a26d-2497148909bd”

{
“results”: [],
“metrics”: {
“elapsedTime”: “1.189476ms”,
“executionTime”: “1.12811ms”,
“resultCount”: 0,
“resultSize”: 0
}
}

How can I kill this running statement?

Thanks,

Steeve

Hi Steve,
in 4.5 you have to kill a running request on the n1ql node it is running on.
You can direct cbq to connect to that specific node with the -engine command line option.
In Spock - we will deal with clustered monitoring operations.

HTH,
Marco

Ok thanks.
lets says I have 12 Nodes, how do I know on which node my query runs without try and repeat until I find the right one?

-steeve

Hi Steve,
for now the trick is to stay connected to the same node.
This happens automatically with query workbench, and you can force it with cbq using the -engine option
eg
cbq -engine http://10.1.2.3:8093
select * from system:active_requests
delete from system:active_requests where…

Part of the issue is that currently RequestsIds don’t have any node information so we don’t know to which node we should be shipping the delete.
For spock we will have RequestIds that are tagged with a node reference and we’ll be shipping delete requests to the correct node from the node you are connected to.

Bear with me :wink:
Marco