Answer the question
In order to leave comments, you need to log in
If you run two different JS scripts through pm2, will they also work in one thread?
I have a normal webserver script and a cron script which in turn executes complex logic. Since Node is running on a 1st thread, I'm worried that the second script will block the thread and the webserver will have to wait for it to complete, thus not responding. So the question was if I run scripts through pm2, how will they work as separate processes as two different programs without interfering with each other? I haven't really delved into the whole scheme yet. I just read somewhere that pm2 can distribute the work of a process across multiple cores.
Or should I look into modules for creating child processes/multithreading in nodeJS?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question