Created
November 11, 2012 02:26
-
-
Save fengmk2/4053403 to your computer and use it in GitHub Desktop.
http parse error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cluster = require('pm'); | |
var master = cluster.createMaster({ | |
pidfile : './aa' | |
}) | |
master.register( | |
'test', | |
'./worker.js', | |
{ | |
children:1, | |
listen:[55555], | |
trace_gc : false | |
} | |
); | |
master.dispatch(); | |
process.on('uncaughtException', function (err) { | |
console.error('uncaughtException %s', err.stack); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var worker = require('pm').createWorker(); | |
var serv = http.createServer(function(req,res){ | |
res.end('hello'); | |
}); | |
worker.ready(function(sock){ | |
serv.emit('connection',sock); | |
}); | |
process.on('uncaughtException', function (err) { | |
console.error('uncaughtException %s', err.stack); | |
}); |
$ node master.js
[master:89743][Sun Nov 11 2012 10:27:35 GMT+0800 (CST)] new worker forked (89744) as "./test"
[worker:89744][Sun Nov 11 2012 10:27:53 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:28:07 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:28:08 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:28:24 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:28:37 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:05 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:06 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:07 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:07 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:08 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:08 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:09 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:09 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:10 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:10 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:10 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:11 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:11 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:89744][Sun Nov 11 2012 10:29:12 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
^Cmk2@~/git/taobaoindex (master) $ node master.js
[master:90093][Sun Nov 11 2012 10:31:33 GMT+0800 (CST)] new worker forked (90094) as "./test"
[worker:90094][Sun Nov 11 2012 10:31:38 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
[worker:90094][Sun Nov 11 2012 10:31:45 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
^Cmk2@~/git/taobaoindex (master) $ sublime master.js
mk2@~/git/taobaoindex (master) $ node master.js
[master:90151][Sun Nov 11 2012 10:32:28 GMT+0800 (CST)] new worker forked (90152) as "./test"
[worker:90152][Sun Nov 11 2012 10:32:30 GMT+0800 (CST)] SOCKET Error: Parse Error
at Socket.ondata (http.js:1410:22)
at TCP.onread (net.js:354:27)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
所有node 0.6.x 版本都会有这个问题。