• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question NodeJS on Plesk website and subdomains

xgenesis

Basic Pleskian
Hey quick question.

So I have a NodeJS server running on Plesk Onyx. This same NodeJS server is used for wildcard subdomains (still in the Plesk panel), so what happens is Plesk actually opens 2 instances of the same Node server instead of using of 1.

Through the Plesk panel, how can you make it so when you're hosting the same Node server on a website and it's subdomains, it doesn't open several instances of that server?
 
Hey quick question.

So I have a NodeJS server running on Plesk Onyx. This same NodeJS server is used for wildcard subdomains (still in the Plesk panel), so what happens is Plesk actually opens 2 instances of the same Node server instead of using of 1.

Through the Plesk panel, how can you make it so when you're hosting the same Node server on a website and it's subdomains, it doesn't open several instances of that server?

Hello,
when you add a subdomain, do you enable nodejs on it ?
Because I have tried on a Plesk server, and it doesn't enable nodejs automatically on each subdomain.
 
Hello,
when you add a subdomain, do you enable nodejs on it ?
Because I have tried on a Plesk server, and it doesn't enable nodejs automatically on each subdomain.

Yes, basically I need the same NodeJS server running on the domain and wildcard subdomain without it creating a second instance.
 
Yes, basically I need the same NodeJS server running on the domain and wildcard subdomain without it creating a second instance.

Just create your subdomains and edit them to use the same root folder than your main domain.
 
No, if you don't enable nodejs on your subdomain it will not create another instance.
 
No, if you don't enable nodejs on your subdomain it will not create another instance.

But both the domain and subdomain use one source code written on NodeJS. If the subdomain doesn't have Node enabled, then doesn't Plesk just default to PHP?
 
But both the domain and subdomain use one source code written on NodeJS. If the subdomain doesn't have Node enabled, then doesn't Plesk just default to PHP?

Without php file to process, it should be a problem. However, you can still disable php on your subdomains.
 
Hi.

Guys, could you explain me why the second instance of the nodejs process is a problem in this case? Excuse my being not experienced with nodejs :)
 
Hi.

Guys, could you explain me why the second instance of the nodejs process is a problem in this case? Excuse my being not experienced with nodejs :)

If your Node application is very CPU or Memory intensive this can become a problem, it would essentially use double the resources. My application also schedules tasks, so the same command would get executed twice (since there are 2 instances for no particular reason).

I'm not saying 2 instances of NodeJS is bad, at times you might need two separate instances of the same application. But a lot of times you don't want to deploy the same application twice if you don't have to so it would be nice to have the option to choose.

This issue was never resolved for me unfortunately. :(
 
Hello,

i have the same problem...

I have two different Plesk server with centOS.
Both NodeJS applications running two instances.

The problem is, that i have a function which executes every 5 seconds. Then it writes one single line in the mysql database. Now if it's running twice - i get two lines in my database!

Did you fixed it? Or anyone else?

Thank you
 
Last edited:
Hello,

i have the same problem...

I have two different Plesk server with centOS.
Both NodeJS applications running two instances.

The problem is, that i have a function which executes every 5 seconds. Then it writes one single line in the mysql database. Now if it's running twice - i get two lines in my database!

Did you fixed it? Or anyone else?

Thank you

No, this issue was never resolved. I don't think its a priority to the maintainers unfortunately. I feel this is essential especially when you have several domains or subdomains running the same application. For example if you have 5 subdomains running the same application, it'll create 5 instances, which will take 5x the memory / cpu for no reason.
 
Back
Top