• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Issue My websites won't run

xgenesis

Basic Pleskian
"Checking whether to disconnect long-running connections"

Everytime one of my other websites is running. So for example if I go to domain1, then it launches with that message and disconnects domain6
 
Are these Node.js applications? Is the Node.js service restarting for some reason?
 
It takes over a minute sometimes for the website to load once Passenger decides to disconnect it for no reason... This would lead to loss traffic, I'm confused as to why this is happening.
 
Contact Plesk Support Team if nobody can't help you here.
 
For anyone that is having the issue I've found a solution and would like to post it here to help anyone else.

Here is the problem:


Passenger Phusion restarts Node web servers that are not being used for a certain period of time. And if you have a lot of node servers (over 3) then Phusion will actively check all servers to see which one it can disconnect in order to save memory.

The solution:

The fix for this is to go into Website & Domains > Apache & nginx Settings. In additional directives for HTTP/S for Apache put this line of code

Code:
PassengerPoolIdleTime 0
PassengerMaxPoolSize 100
PassengerMaxInstancesPerApp 0
PassengerMaxPreloaderIdleTime 0


What this will do is tell Phusion not to check for idle webservers (so they will no longer be disconnected). Not sure how to do it on nginx as when I used the official Phusion documentation was providing an error in Plesk; this doesn't really affect me however since the Apache option worked. With that said, they're still disconnected if you apply an update via Git, but I guess that's a given considering the source code has changed. What I don't understand however is why it disconnects ALL servers, and not just the one that was updated.

For anyone that needs a link to the official Phusion documentation you can find it here: Configuration reference - Apache - Passenger Library


Why this is an important issue

If you are a startup business with very little traffic but own multiple domains then this will drastically affect you in a negative way. If your Node.js server consistently gains traffic then Phusion will just ignore it and not disconnect. However if you're a startup and don't have much traffic, then Phusion will actively work against you. After your Node.js server is disconnected, then you have to wait until someone visits the website in order for it to relaunch. If your Node server takes a while to launch (mine takes approximately 40 seconds as it's a pretty big website), then this is going to cause a lot of loss traffic. A good example is if someone finds your website, during those 40 seconds they're going to assume that the website is broken and then leave before it could even launch (that's a lot of time to wait). Now imagine that happening to everyone that visits. Because if you get 1 visit per hour, then your website will go down because Phusion will determine that the website is not needed online, and then when someone visits it'll go back up (after 40 seconds), and then go right back down after it notices any slight inactivity. As a result your website will take 40 seconds to launch for anyone that visits it.
 
Last edited:
I don't use Phusion or Ubuntu, so I can't help with specific settings on this. However, if I had a service I couldn't control and had to keep it running against an over-zealous timeout feature like this, I'd set up a cron job to hit the website once every few minutes just to keep it up and running. (as a temporary workaround) It could even be a cron job set up on a different server.
 
I don't use Phusion or Ubuntu, so I can't help with specific settings on this. However, if I had a service I couldn't control and had to keep it running against an over-zealous timeout feature like this, I'd set up a cron job to hit the website once every few minutes just to keep it up and running. (as a temporary workaround) It could even be a cron job set up on a different server.

I was doing that for some time, I had set up a Java application that would ping the websites every minute. That didn't really work for me, because if you have over 3 Nodejs websites, Phusion still somehow managed to determine that one of them needed to be disconnected (maybe pinging it every few seconds would've fixed that, I don't know as I didn't try, but not having a proper solution would still be hella annoying).

I've updated the post with newer settings that seem to be working. If any issue arises then I'll post an update. It's been approximately 4 hours and all the websites have managed to stay up, so I think the solution I posted fixes it; since prior to this they wouldn't reach 10 minutes before getting disconnected.
 
Back
Top