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

Have it work with node's debugger #29

Closed
Tug opened this issue May 6, 2015 · 1 comment · Fixed by #37
Closed

Have it work with node's debugger #29

Tug opened this issue May 6, 2015 · 1 comment · Fixed by #37

Comments

@Tug
Copy link

Tug commented May 6, 2015

Hi,
First thank you very much for the lib, it did save me a lot of time.
The only issue I have now is that I cannot debug my app when a WorkerFarm is running.

Those are the errors I'm having:

Failed to open socket on port XXX, waiting 1000 ms before retrying

Looks like each child process' debugger is bound to the same debug port thus the error message and the connection loss with the main process.
Looks like it's a bug in node, which was fixed in v0.11 but not backported to v0.10 (which I'm using) nodejs/node-v0.x-archive#5318

@JSReligion
Copy link

Easy way to make it work with debugger;
//some of my lil code
let isDebug = typeof v8debug !== 'undefined';
let worker = isDebug ? require('./Queue/Worker.js') : workerFarm({
maxCallsPerWorker : 1000
, maxConcurrentWorkers : this.threads
, maxConcurrentCallsPerWorker : 1
, maxConcurrentCalls : this.threads
, maxCallTime : Infinity
, maxRetries : 1
, autoStart : true
}, require.resolve('./Queue/Worker.js'), ['init','task']);
//
Of course its become sync like and has no acually new processes, but itsenough for some little debug :)

@rvagg rvagg closed this as completed in #37 Jun 29, 2017
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

Successfully merging a pull request may close this issue.

2 participants