parallel-webpack icon indicating copy to clipboard operation
parallel-webpack copied to clipboard

parallel-webpack often leaves zombie processes

Open davydog187 opened this issue 8 years ago • 5 comments

Will try to find a way to reproduce, but often running parallel-webpack leaves behind 8 or so node processes that eat up a ton of CPU/memory.

davydog187 avatar Aug 25 '17 15:08 davydog187

I confirm.

anilanar avatar Aug 25 '17 15:08 anilanar

Yes. We have to manually kill those process. Best way: sudo killall -9 node

sprinklr-gurgaon avatar Oct 12 '17 17:10 sprinklr-gurgaon

Thanks, I understand that you can kill the processes, but that’s not the problem. The issue is the fact that they are there, frequently, and consuming a ton of cpu and memory. You’re describing how to address the symptom not the cause

davydog187 avatar Oct 13 '17 00:10 davydog187

I also just stumbled over this problem when watching.

My initial thought was that there is no SIGINT handler defined (Ctrl-C), but there is.

Then I checked a bit more, and found this:

[WEBPACK] Started watching [name].js
^C[WEBPACK] Forcefully shutting down

events.js:182                                                                                                                                                                                               
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at _errnoException (util.js:1021:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:860:14)
[WEBPACK] Build failed after 4.419 seconds
[WEBPACK] Forcefully shut down [name].js

events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at _errnoException (util.js:1021:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:860:14)

My environment: nodejs v8.7.0, webpack v3.6.0. parallel-webpack is started through my package.json using yarn run

When I tried to run parallel-webpack directly without yarn, I got a slightly different error message:

[WEBPACK 08:59:01] Finished building [name].js within 8.555 seconds
^C[WEBPACK] Forcefully shutting down
Worker Farm: Received message for unknown child. This is likely as a result of premature child death, the operation will have been re-queued.
[WEBPACK] Build failed after 11.127 seconds
[WEBPACK] Forcefully shut down modules/desktop/index.js
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
    at process.target.send (internal/child_process.js:590:16)
    at callback (/home/siebert/code/platform/node_modules/worker-farm/lib/child/index.js:32:17)
    at process.shutdownCallback (/home/siebert/code/platform/node_modules/parallel-webpack/src/webpackWorker.js:93:17)
    at emitNone (events.js:105:13)
    at process.emit (events.js:207:7)
    at Signal.wrap.onsignal (internal/process.js:205:44)

siebertm avatar Oct 17 '17 07:10 siebertm

This issue has been opened for almost 3 years now and there's also #29, #33 and #38. Is this bug likely to get solved? Could it actually be the result of misconfiguration? There's no note about the repo getting archived in the README. I'd like to use this as dependency but I don't know if it's safe for production.

iorrah avatar Jul 27 '20 08:07 iorrah