3

I want to stop my currently running code in Rstudio WITHOUT CLOSING RStudio as I have connected SQL database thru channel & it will take a hell lot of time if i abort the process & start from scratch. Please help me. "Esc, Ctrl+c" shortcuts are not working. I 'm using Windows 7 ,64bit OS.

A.G
  • 81
  • 3
  • 6
  • 2
    You've tried clicking the red "stop" button? – neilfws May 25 '17 at 04:52
  • Yes, I have tried but it didn't work in my case :( – A.G May 25 '17 at 04:57
  • 2
    Follow this question [How to stop a running query?](https://stackoverflow.com/questions/43943200/how-to-stop-a-running-query) . This question has bounty worth 50.. – Shakeer Mirza May 25 '17 at 04:58
  • 2
    I'm afraid you may have to admit defeat and try the solution suggested by @ShakeerMirza. I've taken to always keeping Task Manager open on Windows machines at work, solely to try and kill runaway RStudio processes :) – neilfws May 25 '17 at 05:01
  • 1
    Aa suggested by someone before, open the task manager and kill the r process ( not the r studio process). This only restarts your r shell but leaves r studio open. – Buggy May 25 '17 at 05:30
  • 3
    @user3293236 I think the problem is not closing the Rstudio, but losing the workspace. If losing a workspace is an issue, OP should take preventive measures and save it before running any commands which might "hang" the session. – Roman Luštrik May 25 '17 at 05:52
  • Yeah you're right. I should have added that part. – Buggy May 25 '17 at 06:43
  • 1
    letme try@Shakeer – A.G May 25 '17 at 06:51

1 Answers1

1

This is a known problem and according to @hadley, has to do with the database back-ends (connectors).

Also, a suggestion here about using the ODBC drivers. It makes it easier to get RStudio back, but you still have to wait for the query to time out in the database itself.

How to stop a running query?

abalter
  • 9,663
  • 17
  • 90
  • 145