• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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 How to configure a fixed process pool for NodeJS with Passenger

danimora

Basic Pleskian
I need that my NodeJS applications don't shut down automatically when a requests completes. But I am not able to reconfigure Passegner for that.

According to the passenger documentation:
"it spawns and shuts down application processes according to traffic. This allows it to use more resources during busy times, while conserving resources during idle times. For consistent performance, it is thus recommended that you configure a fixed process pool: telling Passenger to use a fixed number of processes, instead of spawning and shutting them down dynamically.

Run passenger start with --max-pool-size=N --min-instances=N, where N is the number of processes you want."

But I cannot find where to configure the start parameters for Passenger. I suspect that Nginxs is who starts Passenger processes but I don't see where to put the max-pool-size and min-instances parameters.

I tried to set the min-instances in a nginx directive that results seems a valid configuration but it does not work.
 
You can configure the max-pool-size in `/etc/nginx/conf.d/phusion-passenger.conf` like this:

```
passenger_max_pool_size 250;
```
 
Hello,
I have a problem setting the passenger configuration.
My /etc/nginx/conf.d/phusion-passenger.conf file looks like this:
passenger_root /usr/share/passenger/phusion_passenger/locations.ini;
passenger_log_file /var/log/passenger/passenger.log;
passenger_log_level 5;
max_app_processes = 100;
passenger_max_pool_size = 100;
passenger_min_instances = 1;
# Avoid downloading of sources or binary for ruby passenger_native_support.so
# after each nginx restart by default because of development packages
# or libruby.so.X.Y may be missed anyway.
# Ruby passenger_native_support.so is packaged for system ruby only.
passenger_env_var PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0;
passenger_env_var PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0;
Then I restart the app, and open a bunch of connections. But if I run passenger-status, I get
----------- General information -----------
Max pool size : 6
App groups : 1
Processes : 1
Requests in top-level queue : 0
----------- Application groups -----------
/var/www/vhosts/example.com/cloud.example.com (production):
App root: /var/www/vhosts/example.com/cloud.example.com
Requests in queue: 0
* PID: 16858 Sessions: 1 Processed: 169 Uptime: 1m 3s
CPU: 8% Memory : 101M Last used: 2s ago
I expect my "Max pool size" should be 100.... What do I do wrong?
 
Sorry to reopen this old thread, but a strange thing happened to me.
A few years ago I configured phusion passenger as described here, editing `/etc/nginx/conf.d/phusion-passenger.conf`.
In the past months our app started to show a noticeable slowdown. At first we thought about traffic, we worked hard on optimizing the app, but the app was still slow.
This morning I accidentally checked the "passenger-status" and... surprise: phusion-passenger.conf was back to the default, without all my configurations.

How is this possible?
Maybe this file is not meant to be modified... Where should the configurations for phusion passenger be indicated?
 
Back
Top