Passenger process min does not seem to be honored

12 views
Skip to first unread message

Jon Heckman

unread,
Jul 22, 2016, 2:15:26 PM7/22/16
to Phusion Passenger Discussions
I am running into some oddities with process minimums. This is on the open source version 5.0.15
I have attached a (modified so addresses, app name, and other information was changed for safety) copy of my nginx.conf file
The key issues I am running into:
Here is what my passenger-status currently looks like
----------- General information -----------
Max pool size : 14
App groups    : 8
Processes     : 14
Requests in top-level queue : 0

----------- Application groups -----------
/var/www/events/public (production):
  App root: /var/www/events
  Requests in queue: 0
  * PID: 12532   Sessions: 0       Processed: 167     Uptime: 5h 25m 4s
    CPU: 0%      Memory  : 142M    Last used: 4s ago
  * PID: 11765   Sessions: 0       Processed: 0       Uptime: 30m 27s
    CPU: 0%      Memory  : 99M     Last used: 30m 27s ago
  * PID: 16451   Sessions: 0       Processed: 0       Uptime: 24m 53s
    CPU: 0%      Memory  : 52M     Last used: 24m 53s ago
  * PID: 18898   Sessions: 0       Processed: 0       Uptime: 20m 48s
    CPU: 0%      Memory  : 51M     Last used: 20m 48s ago
  * PID: 22448   Sessions: 0       Processed: 0       Uptime: 15m 7s
    CPU: 0%      Memory  : 49M     Last used: 15m 7s ago
  * PID: 24925   Sessions: 0       Processed: 0       Uptime: 10m 27s
    CPU: 0%      Memory  : 37M     Last used: 10m 27s ago
  * PID: 26593   Sessions: 0       Processed: 0       Uptime: 8m 13s
    CPU: 0%      Memory  : 37M     Last used: 8m 13s ago

/var/www/data/public (production):
  App root: /var/www/data
  Requests in queue: 0
  * PID: 28432   Sessions: 0       Processed: 194     Uptime: 6m 6s
    CPU: 13%     Memory  : 813M    Last used: 1s ago
  * PID: 29127   Sessions: 0       Processed: 82      Uptime: 4m 35s
    CPU: 2%      Memory  : 183M    Last used: 28s ago
  * PID: 30101   Sessions: 0       Processed: 10      Uptime: 2m 51s
    CPU: 0%      Memory  : 99M     Last used: 1m 4s ago

/var/www/crawler/public (production):
  App root: /var/www/crawler
  Requests in queue: 0
  * PID: 18750   Sessions: 0       Processed: 2       Uptime: 21m 10s
    CPU: 0%      Memory  : 88M     Last used: 7m 44s ago

/var/www/buffer/public (production):
  App root: /var/www/buffer
  Requests in queue: 0

/var/www/my_portfolio/public (production):
  App root: /var/www/my_portfolio
  Requests in queue: 0

/var/www/tools/public (production):
  App root: /var/www/tools
  Requests in queue: 0
  * PID: 9569    Sessions: 0       Processed: 681     Uptime: 5h 27m 58s
    CPU: 0%      Memory  : 116M    Last used: 12s ago

/var/www/scores_rails/public (production):
  App root: /var/www/scores_rails
  Requests in queue: 0
  * PID: 23808   Sessions: 0       Processed: 161     Uptime: 12m 20s
    CPU: 9%      Memory  : 280M    Last used: 4s ago

/var/www/sales/public (production):
  App root: /var/www/sales
  Requests in queue: 0
  * PID: 28891   Sessions: 0       Processed: 168     Uptime: 5m 9s
    CPU: 0%      Memory  : 135M    Last used: 11s ago


The 2 biggest probelms are that 'events' keeps spinning up unused instances while 'data' is far below the minimum number I have set for it, which is 7 (has 3 in the picture). 
There is also the case of 'scores_rails' only having 1 even though I tell it to have 2 minimum. 
I thought the issue with 'events' may be related to the 'location' settings I am doing under 'data', but 'sales' is not showing the same issue and it is configured the same way.
I was thinking about getting the passenger enterprise to gain the max instances, but this seems like a different problem.

nginx.conf

Jon Heckman

unread,
Jul 22, 2016, 2:41:59 PM7/22/16
to Phusion Passenger Discussions
I have done more testing and it looks like 'events' is using the min_instances and max_requests from the 'data' server block. It just looks like passenger is trying to make the best of the situation while keeping below the max_pool_size
So maybe the issue is how I have those 2 sub-apps setup in nginx. 
From the website flow standpoint it works how I want it to (again not the right url's below).
data.com/sales goes to the sales app
data.com/events goes to events app
what is left over under data.com goes to the data app.

I am going to try tweaking the settings a bit, but if anyone has any insights that would be great. 

Daniel Knoppel

unread,
Aug 17, 2016, 4:55:08 AM8/17/16
to Phusion Passenger Discussions
This part of the Passenger Library might provide more insight: https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_instances

- Daniel
Reply all
Reply to author
Forward
0 new messages