• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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