Nginx + Passenger 无法正常工作——客户端请求挂起直至超时

Nginx + Passenger 无法正常工作——客户端请求挂起直至超时

我在安装了 Amazon Linux 的 EC2 实例上运行,并通过 安装了 Nginx passenger-install-nginx-module。 随后的完整安装过程类似于. 主要区别在于 ruby​​ 是通过 RVM 安装的,如所述这里

ngix.conf:

user  www;
worker_processes  1;

events {
    worker_connections  1024;
}


http {
    passenger_root /var/www/.rvm/gems/ruby-2.2.2/gems/passenger-5.0.9;
    passenger_ruby /var/www/.rvm/gems/ruby-2.2.2/wrappers/ruby;

    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen             80;
        server_name        .example.com;
        passenger_enabled  on;
        root               /var/www/example_com/public;

        error_page  404              /404.html;
        error_page   500 502 503 504  /500.html;
    }
}

耙子路线:

                  Prefix Verb   URI Pattern                       Controller#Action
           subscriptions GET    /subscriptions(.:format)          subscriptions#index
                         POST   /subscriptions(.:format)          subscriptions#create
        new_subscription GET    /subscriptions/new(.:format)      subscriptions#new
       edit_subscription GET    /subscriptions/:id/edit(.:format) subscriptions#edit
            subscription GET    /subscriptions/:id(.:format)      subscriptions#show
                         PATCH  /subscriptions/:id(.:format)      subscriptions#update
                         PUT    /subscriptions/:id(.:format)      subscriptions#update
                         DELETE /subscriptions/:id(.:format)      subscriptions#destroy
                         GET    /                                 thumbs#index {:subdomain=>"api"}
                  create POST   /create(.:format)                 thumbs#create {:subdomain=>"api"}
                  status GET    /status(.:format)                 thumbs#show {:subdomain=>"api"}
              mime_types GET    /mime_types(.:format)             thumbs#mime_types {:subdomain=>"api"}
                    root GET    /                                 pages#index
        new_user_session GET    /login(.:format)                  devise/sessions#new
            user_session POST   /login(.:format)                  devise/sessions#create
    destroy_user_session DELETE /logout(.:format)                 devise/sessions#destroy
   new_user_registration GET    /register(.:format)               devise/registrations#new
  edit_user_registration GET    /profile(.:format)                devise/registrations#edit
                   users GET    /users(.:format)                  users/registrations#index
           user_password POST   /users/password(.:format)         devise/passwords#create
       new_user_password GET    /users/password/new(.:format)     devise/passwords#new
      edit_user_password GET    /users/password/edit(.:format)    devise/passwords#edit
                         PATCH  /users/password(.:format)         devise/passwords#update
                         PUT    /users/password(.:format)         devise/passwords#update
cancel_user_registration GET    /users/cancel(.:format)           users/registrations#cancel
       user_registration POST   /users(.:format)                  users/registrations#create
                         GET    /users/sign_up(.:format)          users/registrations#new
                         GET    /users/edit(.:format)             users/registrations#edit
                         PATCH  /users(.:format)                  users/registrations#update
                         PUT    /users(.:format)                  users/registrations#update
                         DELETE /users(.:format)                  users/registrations#destroy
                   about GET    /about(.:format)                  pages#about
                    docs GET    /docs(.:format)                   pages#docs

当 nginx 最终放弃时出现的错误(启用信息日志记录,这是错误中记录的全部内容):

[ 2015-06-05 05:22:19.3057 21672/7fefc573d700 age/Hel/Main.cpp:800 ]: Disconnecting long-running connections for process 23335, application /var/www/example_com/public#default

相关内容