nickjs icon indicating copy to clipboard operation
nickjs copied to clipboard

The number of process for chrome is increasing even I use tab.close()

Open msaus opened this issue 7 years ago • 4 comments

Environemnt: Ubuntu 16.04 Nickjs ^0.3.6 Nodejs v8.11.1

Hello there, I am getting this even I use the tab.close(). Do you know why I am getting more chrome process? Should I use nick.exit() after the execution if I want to kill all chrome process?

Regards,

msaus avatar Jun 08 '18 08:06 msaus

But, if I use nick.exit() then pm2 process restarts every time.......

msaus avatar Jun 08 '18 08:06 msaus

Well....possibly this could solve like following with pm2.

  1. Set pm2 exec_mode to cluster.
  2. Set pm2 instance to 4.
  3. Set concurrent request to 2(guzzelHttp Client).
  4. Use tab.close() and nick.exit() after execution.

The point is that the number of concurrent request should be 2 time bigger than pm2 instance.

msaus avatar Jun 08 '18 08:06 msaus

It's not clear in my head what you're trying to achieve. Can you describe your use case in more details?

nick.exit() will kill all chrome processes. You can also kill it manually by executing a shell command like killall google-chrome or similar, using Node's child_process module. (In that case, you'll need to delete/lose all references to your current Nick instance, and start another one with new.)

If Chrome really starts a infinite number of processes just by opening tabs over time, then it's a bug with Chrome itself and should be reported upstream. (That is, in Chrome's bug tracker.)

paps avatar Jun 08 '18 14:06 paps

Sorry for unclear explanation. I am getting infinite number of process if I do not use nick.exit(). So, I was trying to kill google chrome process every time finished. chrome version is 67 and i guess this is the latest one for ubuntu. I just reported this to google yesterdays and see what they reply.

msaus avatar Jun 08 '18 21:06 msaus