Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 4 is broken with clusters #2819

Closed
born2net opened this issue Sep 11, 2015 · 2 comments
Closed

Node 4 is broken with clusters #2819

born2net opened this issue Sep 11, 2015 · 2 comments
Labels
cluster Issues and PRs related to the cluster subsystem.

Comments

@born2net
Copy link

I have simple 8 thread cluster and run

if (cluster.isMaster) {

    console.log('node ver: ' + process.versions.node);
    console.log('v8 ver: ' + process.versions.v8);

    var cpuCount = require('os').cpus().length;
    for (var i = 0; i < cpuCount; i += 1)
        cluster.fork();

    cluster.on('exit', function (worker) {
        console.log('Worker ' + worker.id + ' died so restarting');
        cluster.fork();
        console.log('total workers ' + _.size(cluster.workers));
    });

and as soon as I run with node 4.0.0 each thread just exists.
no error or dump, just exists, switching back to io.js works fine..

am I missing something?

Regards,

Sean

@ChALkeR ChALkeR added the cluster Issues and PRs related to the cluster subsystem. label Sep 11, 2015
@cjihrig
Copy link
Contributor

cjihrig commented Sep 11, 2015

Do you have a runnable example that demonstrates the problem? Also, what OS are you on? We run a number of cluster tests against a variety of operating systems, so I think cluster at least works.

@born2net
Copy link
Author

I narrowed it down... sorry my bad... well not my bad, but Redis is the cause with 4.0

 **/
exports.msInitRedis = function () {
    var redis = require("redis");
    redisClient = redis.createClient();
    exports.redisClient = redisClient;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants