How to kill one tab of google chrome using pid

17

4

I want to close one tab of chrome. I tried killing the pid of the tab, but the tab doesn't close instead says "Aw, Snap! Something went wrong while displaying this webpage. To continue, reload or go to another page". How can I get rid of this.

Naveed

Posted 2011-07-05T20:50:57.970

Reputation: 323

Answers

9

You can't close a tab by killing the process. The process represents a renderer that the main browser uses the execute and draw a page, which it then copies to the screen. The "Aw, Snap!" is what the browser displays when the renderer responsible for that tab crashes or is killed. The proper way to close the tab would ideally be via a command-line switch, but there is none that I know of at this time.

Darth Android

Posted 2011-07-05T20:50:57.970

Reputation: 35 133

4

Plus, of course, there isn't a 1:1 relationship between tabs and renderer processes in the first place.

– JdeBP – 2011-07-05T21:30:02.667

44

It is possible to kill an unresponsive tab (or set of tabs) in Chrome by going to:

  1. Hamburger Icon (three lines in top-right);
  2. More Tools;
  3. Task Manager and clicking on the tab name;
  4. Then clicking the "End Process" button at the bottom.

bruzzi

Posted 2011-07-05T20:50:57.970

Reputation: 541

Thanks, made the tab say "Oh, snap!" and then I could close it. – Dorian – 2015-12-17T12:40:55.677

1This should be the accepted answer ;) – maxime1992 – 2017-07-05T16:47:19.963

3I think this is as close as you will get to what you're looking for. – n0pe – 2011-08-05T13:33:43.453

Worth noting (correct as of sept 2013 at least) that it's now a stacked lines / hamburger icon and not a wrench. – StackExchange What The Heck – 2013-09-14T21:14:18.637

1

The message you see is the one that you are supposed to see if a tab is killed. That tab is not using any memory or resources of any kind until you reload it. If you have 3,000 open tabs and all but one are killed (and therefore have this message), your computer will run smoothly. If you want to close the tab and lose the URL and cached information, the just close it. With the 'X'.

Raven

Posted 2011-07-05T20:50:57.970

Reputation: 11

0

This may be helpful for you. Probably a whole bunch of Chrome windows/tabs have become "unresponsive".

If you go to the Windows GUI Task Manager and kill the ProcessTree of all the Chrome.exe 'processes' eventually, you will click on one, that will kill all the Chrome Windows & Tabs. then if you re-open Chrome, you'll get a tan colored bar that asks if you want to restore the previous pages, that will reopen everything you had before.

Problem with this issue: Time consuming, if you go to admin CMD window and issue a taskkill command to '/F' (forcefully) kill everything with the imagename of CHROME, they will all die instantly, but when you reopen Chrome, it won't remember anything or ask if you want to restore anything; unless you kill the one 'master' PID of the ChromeBrowser itself. I can't find anything unique about that process to kill it without having to lookup it's dynamic PID every time.

My solution:

  1. RightClick in the Chrome "Title-Bar" and choose: "Task Manager" (the Shift+Esc shortcut, is slower, and often doesn't work). At the top of the list, you'll see "Browser" with a chrome icon. This is the only entry you can't select and click on [End-Process] in the column, find it's "Process-ID"
  2. From an ADMIN-CMD Window issue this command: taskkill /F /FI "PID eq _ _ _ _" (fill in the blanks with the PID) Then Chrome will die almost instantly, and when you reopen, it will offer to restore previous pages.
  3. the easiest way to handle this is with a batch-file using the "SET /p" feature to allow you to just type in the PID number in order to make it run, more or less automatically.

Zip Zinzel

Posted 2011-07-05T20:50:57.970

Reputation: 1

In task manager, activate the "Command line" table column. the "original" Chrome process will have no --type=renderer or something as the parameters. The parameters will also be completely different from all others. And way shorter. That's the one! – sinni800 – 2015-04-20T10:18:06.770

This answer is completely illegible. You should reformat it to allow users to read with ease. – MariusMatutiae – 2014-06-08T05:50:42.743