Giter Site home page Giter Site logo

Comments (12)

paps avatar paps commented on June 6, 2024

Maybe you have too many open tabs? Are you closing the tabs you're not using?

"After running for a while" means about how long?

from nickjs.

msaus avatar msaus commented on June 6, 2024

I always close the tab.
After crawling 10 web site, I get this error message.

from nickjs.

paps avatar paps commented on June 6, 2024

Does it happen on other websites? Is the website so heavy that maybe you have no memory left? What have to tried? Thx

from nickjs.

msaus avatar msaus commented on June 6, 2024

No it dose not happened on other website.
Then, my server has 8G memory and the memory is always 3G left as well as swap not being happened.

Also, now the error happens sometimes, not often.
This is bit weird for me.

from nickjs.

msaus avatar msaus commented on June 6, 2024

Possibly, we wait and see how things go.

from nickjs.

paps avatar paps commented on June 6, 2024

Maybe start NickJS in debug mode (debug: true in constructor) and we can see some output showing us what's wrong

from nickjs.

allgrowsm avatar allgrowsm commented on June 6, 2024

Sorry for late reply.

I got following errors.

2019-12-12 12:28 : CHROME STDERR: [1212/122838.971585:ERROR:socket_posix.cc(145)] bind() failed: address already in use (98)
DevTools listening on ws://[::1]:9222/devtools/browser/98a1a41d-1cb9-4a6c-97e8-ca7cdb590840
2019-12-12 12:28 : > It took 103ms to start and connect to Chrome (1 tries)
2019-12-12 12:28 : Error: could not list chrome tabs: Error: connect ECONNREFUSED 127.0.0.1:9222
2019-12-12 12:28 : CHROME STDERR: 
DevTools listening on ws://127.0.0.1:9222/devtools/browser/833f02dc-74f5-484f-930e-5e5b4881d26b
2019-12-12 12:28 : > It took 256ms to start and connect to Chrome (2 tries)

from nickjs.

paps avatar paps commented on June 6, 2024

Well, it looks like the 9222 port is already in use on your system. Maybe you already have Chrome running with debug enabled, even though NickJS tries to start a new one?

A fix would be to disable debug mode on this other Chrome instance, or at least change the port (which is one of the cmd line options of Chrome).

from nickjs.

allgrowsm avatar allgrowsm commented on June 6, 2024

@paps
Thanks for your reply.

I finally found the reason why I am getting these errors every time I access to my crawler.

I use pm2 for load balancing node process and port collision occurs because of multiple node process.

Dose nickJS has options for the port number?

from nickjs.

paps avatar paps commented on June 6, 2024

Oh ok, I see. That means your node instances are started with debugging enabled right?

You can use additionalChildOptions (array of command line parameters) to change how Chrome is started in NickJS (this only works in the latest version, please update if necessary). But I'm afraid you will not be able to change the port number this way, this is one of the hardcoded options of NickJS. You will need to free port 9222 somehow. Or submit a PR :)

from nickjs.

allgrowsm avatar allgrowsm commented on June 6, 2024

@paps
Thanks for that.
I will take a look at that option and see if I can change port number as well as submitting PR :)

from nickjs.

allgrowsm avatar allgrowsm commented on June 6, 2024

@paps
Hi there,
I just had quick look at your source code and I understand what the hardcoded options mean.
This sort of option should be optionally set when it is constructed or after initialized.
I will have a look at this issue after the long holiday.
Happy Holiday :)

from nickjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.