【问题标题】:passenger_min_instances not working with passenger ruby 2.3 docker乘客最小实例不与乘客 ruby​​ 2.3 docker 一起使用
【发布时间】:2020-05-28 11:02:36
【问题描述】:

我在乘客 docker ruby​​ phusion/passenger-ruby23 中有以下 Nginx 配置,如下所示

server {
    # max body size (request + fileupload)
    client_max_body_size 5M;

    listen 80;
    server_name localhost;

    location ~* ^/assets/ {
      # if $uri, if not exist then '/404.html'
      try_files $uri =404;
      expires 1y;

      # when Last-Modified is present, ETag is discourage
      add_header ETag "";

      add_header Cache-Control public;
      add_header "Access-Control-Allow-Origin" "*";
      add_header "Access-Control-Allow-Methods" "GET";
    }

    # Nginx serve static assets
    root /home/app/avocado/public;

    passenger_min_instances 10;

    passenger_enabled on;
    passenger_user app;

    passenger_app_env staging;

    passenger_ruby /usr/bin/ruby2.3;
}

Web 服务器运行良好,只是当我运行命令 passenger-status 时,我得到以下输出:

> passenger-status 

Using /usr/local/rvm/gems/ruby-2.3.8
Version : 6.0.4
Date    : 2020-05-28 10:25:03 +0000
Instance: feaXd0Zv (nginx/1.14.0 Phusion_Passenger/6.0.4)

----------- General information -----------
Max pool size : 6
App groups    : 0
Processes     : 0
Requests in top-level queue : 0

----------- Application groups ------------

这意味着乘客没有以我在上面的配置中指定的 passenger_min_instances 10; 的最小进程数开始。

有人遇到过这个问题吗?

【问题讨论】:

    标签: passenger passenger-nginx


    【解决方案1】:

    刚刚开始使用以下配置

    server {
      ...
      passenger_min_instances 10;
    }
    
    passenger_max_pool_size 15;
    passenger_pre_start http://localhost:80;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-23
      相关资源
      最近更新 更多