Comments (2)
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.
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)
- SIGKILL isn't catchable HOT 1
- add a license please HOT 1
- There doesn't appear to be a way to get a handle on the workers HOT 1
- repl: workers array objects should have more options
- repl doesn't work running root
- Possible usage for fs.createReadStream
- Logs streams, worker events, REPL... HOT 4
- There is no way to disconnect output to console
- What is "256MB RSS cap" HOT 2
- The application shuts down with error 'Cannot set property 'lookup' of undefined(dgram.js:147:20)'
- end event listener registration error
- if workers send an 'field' message, then attach to its worker object in the repl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cluster-master.