Skip to main content

Questions tagged [node-worker-threads]

The tag has no usage guidance.

node-worker-threads
0 votes
0 answers
17 views

Nodejs Worker_threads not work on worker side

I have 3 files with test.js, main_worker.js, and worker.js. First, test.js const multiTask = require('./main_worker.js'); function processNextStep(results) { console.log('Do something with ...
Luna71712's user avatar
-2 votes
0 answers
43 views

How to further improve Node.js server application performance

My Question: What can I do to gain performance for my worker part, it doesn't necessarily need to be interpreted in my code but just in general? Would choosing a different language be in my situation ...
Schtraded's user avatar
0 votes
0 answers
42 views

How to Parallelize Puppeteer Tasks Using Worker Threads in Node.js?

I'm working on a Node.js project where I need to run multiple Puppeteer instances in parallel to scrape data from a website. I've read that using worker_threads can help achieve this by running tasks ...
Ilya's user avatar
  • 25
0 votes
1 answer
34 views

Can workers be the main cause of my node app crashing on production?

We are testing a Node.js backend on AWS, but our app keeps crashing after some use of certain tools that take a little bit long. We have in our implementation workers, but I don't know if they are ...
Unique Rax Law's user avatar
0 votes
1 answer
47 views

Nodejs worker threads implementation issue

I have a test1.ts file where I was trying to offload some CPU-intensive image manipulation work to worker threads. Below is the code shown for file test1.ts and also its invocation at another file. ...
vipul ahuja's user avatar
0 votes
0 answers
68 views

How can I outsource worker processes within a for loop?

I would like to outsource the following hungry process in a worker within the loop: encoder.addFrame(ctx); Unfortunately, I have not been able to do this with node.js worker threads so far. Perhaps I ...
user1154112's user avatar
0 votes
0 answers
92 views

Workerpool says my workers are terminated when I try to execute a function

I'm trying to add workers to my Node.JS application so that I can run jobs after an endpoint gets hit and eventually process files. I am trying to use the npm package workerpool but when I call my ...
Daniel's user avatar
  • 95
0 votes
0 answers
44 views

NODEJS - Call function between worker_threads and parent (or vice versa)

Nodejs supports communication between worker and parent using the postMessage method, however it only supports one-way communication. If you want two-way communication by calling a worker function ...
hieumc's user avatar
  • 1
0 votes
0 answers
38 views

NodeJS: WorkerThread or setInterval?

I currently writing a Node app that will launch a bunch of services to check a condition every X seconds and if the result is true, will perform some actions. My first implementation is to instantiate ...
Clint's user avatar
  • 1
0 votes
0 answers
43 views

Running worker file in a loop gives error for nodeJs application

When I am running a worker file inside a nodeJs application in a loop it gives error as : Module did not self-register: '/server/node_modules/onnxruntime-node/bin/napi-v3/linux/x64/onnxruntime_binding....
Rajesh Kumar's user avatar
1 vote
1 answer
110 views

Why worker threads aren't working when creating an class instance from other file?

I have this typescript file: import { Worker, WorkerOptions, isMainThread, parentPort } from "worker_threads"; import path from "path"; export class SimpleWorker { private ...
rook99's user avatar
  • 1,070
0 votes
0 answers
41 views

Can, I use cluster with worker threads in nodeJS?

Is it possible to use cluster + worker thread if I have a use case where I am getting multiple concurrent requests which are CPU-intensive. Will that do better in performance? I implemented clusters ...
aayush pagare's user avatar
0 votes
1 answer
65 views

Worker thread in Twilio’s serverless function?

I’m building a voice application with Twilio’s serverless functions, I need a run a process after gathering user speech input form an incoming call that can take > 15 secs to execute thus resulting ...
user3479569's user avatar
1 vote
0 answers
103 views

How many threads Node creates per core when using worker threads?

I'm running node js worker threads on MacBook Air M1. There are 8 core. And using PISCINA to create threads. I'm getting 12 threads. Are those for one core or on all 8 core. How do I know if main ...
C'Reality Education's user avatar
0 votes
0 answers
27 views

How to reuse loaded tensorflow model in workerthread in nodejs

I have a tensorflowjs model that I plan to use in nodejs. As the model inference is CPU intensive, I leveraged workerthreads. I do not want to load the model to workerthread every single time before I ...
Doug's user avatar
  • 177

15 30 50 per page
1
2 3 4 5
9