diff --git a/packages/engine-multi/src/worker/child/create-thread.ts b/packages/engine-multi/src/worker/child/create-thread.ts index 29dd8be4d..163d2f958 100644 --- a/packages/engine-multi/src/worker/child/create-thread.ts +++ b/packages/engine-multi/src/worker/child/create-thread.ts @@ -19,6 +19,10 @@ const createThread = ( maxOldGenerationSizeMb: options.memoryLimitMb, }, }); + worker.on('error', (err) => { + console.log('**** WORKER THREAD ERROR'); + console.log(err); + }); worker.postMessage({ type: ENGINE_RUN_TASK, diff --git a/packages/engine-multi/src/worker/pool.ts b/packages/engine-multi/src/worker/pool.ts index 496f7e0ce..beb02a0a4 100644 --- a/packages/engine-multi/src/worker/pool.ts +++ b/packages/engine-multi/src/worker/pool.ts @@ -84,6 +84,10 @@ function createPool(script: string, options: PoolOptions = {}, logger: Logger) { // maybe good in prod, maybe bad for dev silent: options.silent, }); + child.on('error', (err) => { + console.log('**** CHiLD PROCESS ERROR'); + console.log(err); + }); logger.debug('pool: Created new child process', child.pid); allWorkers[child.pid!] = child; } else {