この記事に従って、Ubuntu Nginx、Rails、およびシンサーバーを用意しましたが、ホームページにアクセスする500 Internal Server Error
と、次のエラーログが表示されます。
2012/09/29 18:43:14 [alert] 15917#0: *1013 socket() failed (24: Too many open files) while connecting to upstream, client: 50.57.229.222, server: 50.57.229.222, request: "GET / HTTP/1.0", upstream: "http://50.57.229.222:80/", host: "50.57.229.222"
ここで何が起こっているのか分かりますか?
/etc/nginx/sites-enabled/gitwatcher.com はこちら:
upstream gitwatcher {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
server 127.0.0.1:3002;
}
server {
listen 80;
server_name 50.57.229.222;
access_log /var/www/gitwatcher/log/access.log;
error_log /var/www/gitwatcher/log/error.log;
root /var/www/gitwatcher;
index index.html;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby;
}
location @ruby {
proxy_pass http://50.57.229.222;
}
}