isaacs / cluster-master Goto Github PK
View Code? Open in Web Editor NEWTake advantage of node built-in cluster module behavior
License: ISC License
Take advantage of node built-in cluster module behavior
License: ISC License
I am trying to get my hands on the forked workers but I can't seem to find a way. I've looked at the code and it appears that the workers are spawned and forgotten.
Is this correct? If so would it be possible to add handles and a method to access them?
I appologize if I'm missing something obvious, I'm new to node.js processes.
Not sure why this is. It's like the first one is being ignored.
Maybe because npm-www starts up 2 servers?
This project has not had a lot of activity. I would like to see some new features like:
exit
, online
etc..exit
in the REPL is not exactly right, I think that sock.end() is what people are looking for, update documentation/implementation.Should I make some PR's or should I fork the project and start anew?
Hi all, I've been working on a tool to identify instances of events registered to the wrong object in uses of some JavaScript event-driven APIs, as part of a research project.
The tool flagged line 213 in cluster-master.js in the root of this repository, on the registration of the “end” event.
The reason I believe this is indicative of an error is as follows (from looking at the nodejs repl API documentation).
This listener for “end” is registered on variable r, which is an object of type repl.REPLServer, initialized on line 138 by a call to repl.start(). However, “end” is not an event emitted on repl.REPLServer.
My guess is that maybe instead you should be listening for “exit” (an event on repl.REPLServer), or “close” (an event on readline.Interface, which repl.REPLServer extends).
Thanks!
Ie, a worker should be able to do process.send({cmd: 'field', key: 'gitsha', value: 'dead134fdecafbad00aaabbb' })
and then in the workers object in the repl, you'll see gitsha: 'dead134fdecafbad00aaabbb'
All the debug outputs are always printed on the console.
Hi,
Is it possible to use this module to handle reading files?
Thanks
I started my node server app from root crontab, using cluster-master and even though I had "repl:3001" set, the repl seems to have not started.
netstat showed no listener on 3001.
on startup, I did see the message: "resize and then setup repl"
crontab invoked this script:
cd /home/jloveman/callhome2
/usr/bin/screen -dmS callhome2 sudo node /home/jloveman/callhome2/cluster_worker.js
And node knows it:
process.on("SIGKILL", function(){})
Error: uv_signal_start EINVAL
I think you're always hitting your catch.
We recently moved from pm2 to using supervisor with cluster-master, application yesterday went down due to a fatal error and I've this in logs:
dgram.js:147
newHandle.lookup = self._handle.lookup;
^
TypeError: Cannot set property 'lookup' of undefined
at replaceHandle (dgram.js:147:20)
Could you please give some insights on this, like if this issue is because of cluster-master or some wrong implementation from my side.
i'm technically not allowed to use this module as a missing license indicates all rights reserved. lawyers suck but corporate likes them.
any way you could slap mit or bsd in here somewhere? :)
disconnect -> cluster.workers[worker.id].disconnect()
kill - > cluster.workers[worker.id].process.kill()
Others?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.