Giter Club home page Giter Club logo

Comments (2)

 avatar commented on June 20, 2024

In my experience, calling .disconnect() a second time on a worker will cause it to disconnect immediately, ignoring any current ._connections open from a httpServer in that worker.

Also from what I can tell (using express / cluster) ._connections stay open on httpServer's for a long period of time (>30 seconds?) after a page request has been fulfilled, so any recently used workers won't die from a single disconnect for that long period of time.

Not sure if your two disconnects was related to the former, or your frequently was related to the latter, but wanted to share both tidbits anyways in case it's helpful.

from cluster-master.

tim-kos avatar tim-kos commented on June 20, 2024

I am struggling with the exact same issue.

To easily reproduce this, do the following:

master.js contains https://gist.github.com/tim-kos/0da0f2f6559646aa2076
server-worker.js (in the same directory) contains: https://gist.github.com/tim-kos/2acb5589b33403cad80b

Start master.js, go to localhost:8000 and see the server output. Then change the output around in server-worker.js from "hello world8" to "hello world9", etc. Do this as often as you want and keep refreshing your browser page. I have seen outputs from workers whose version is 3 restarts old ... and it's likely that it's related to this issue.

Here is my log output in case it's useful: https://gist.github.com/tim-kos/a2f16a644ad788512300 Please note the "Already restarting. Cannot restart yet." messages (expected) and the "Error: IPC channel is already disconnected" errors (not expected).

from cluster-master.

Related Issues (13)

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.