Groups
Groups
Sign in
Groups
Groups
nodejs
Conversations
About
Send feedback
Help
how to set worker v8 options in cluster module?
101 views
Skip to first unread message
darcy
unread,
Aug 9, 2012, 2:44:17 AM
8/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
if start program by "node --trace_gc mynode.js",, and use cluster module to start worker process, the options is not passed to the worker.
I learned the api docs, but no api for this popurse.
Ben Noordhuis
unread,
Aug 9, 2012, 10:59:54 AM
8/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
Try this:
var argv = process.execArgv.concat(['--trace_gc']);
child_process.fork(filename, {execArgv:argv});
darcy
unread,
Aug 10, 2012, 2:13:14 AM
8/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
Thanks for your help.
I've found that process.execArgv is supported in v0.8, but not in v0.6, which is used by me now.
And in cluster of node v0.8, the worker process is started with the node options used in master default.
Reply all
Reply to author
Forward
0 new messages