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

Cluster can't trnasfer MSSQL Result :Error: write ENOTSUP #189

Open
windwaterbo opened this issue Dec 5, 2014 · 1 comment
Open

Cluster can't trnasfer MSSQL Result :Error: write ENOTSUP #189

windwaterbo opened this issue Dec 5, 2014 · 1 comment

Comments

@windwaterbo
Copy link

After my http server got query result from mssql , I wanted to send them to html . I got error as follow.

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: write ENOTSUP
    at exports._errnoException (util.js:742:11)
    at ChildProcess.target._send (child_process.js:482:28)
    at ChildProcess.target.send (child_process.js:415:12)
    at sendHelper (cluster.js:657:8)
    at send (cluster.js:493:5)
    at cluster.js:469:7
    at SharedHandle.add (cluster.js:99:3)
    at queryServer (cluster.js:461:12)
    at Worker.onmessage (cluster.js:419:7)
    at ChildProcess.<anonymous> (cluster.js:673:8)

my mssql module using mssql , I have a mssql callback to get query result. Whether directly or indirectly(callback) , to get result . It can't transaction.

ps. node version is v0.11.14

if (cluster.isMaster) {
    console.log('CPUs: ' + os.cpuCount());
    for (var i = 0; i < os.cpuCount(); i += 1) {
        cluster.fork();
    }

    cluster.on('exit', function (worker) {

        // Replace the dead worker, we're not sentimental
        console.log('Worker ' + worker.id + ' died :(');
        cluster.fork();

    });

} else {
.....
.....
app.get('/query/', function(req, res, next) {
async.waterfall([

            function(Acallback) {
                query.acr_query('ACR', Acallback);
            },
            function(result, Acallback) {
                console.log(result);
                var temp=result;
                return res.send(temp);
            }
        ], function(err, result) {

        });

});
......
.....
http.createServer(app).listen(port);
 }

node version is v0.11.14

@pushkeryadav
Copy link

I am also facing the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants