Skip to content

Node 4 is broken with clusters #2819

Closed
Closed

Description

@born2net

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

Activity

  1. added
    clusterIssues and PRs related to the cluster subsystem.
    on Sep 11, 2015
  2. cjihrig commented on Sep 11, 2015

    @cjihrig
    Contributor

    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.

  3. born2net commented on Sep 11, 2015

    @born2net
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    clusterIssues and PRs related to the cluster subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions