title: worker_connections are not enough
body: <p>I am trying access <code>kibana</code> application deployed in <code>nginx</code>,but getting below </p>
  
  <p>URL :- <code>http://127.0.0.1/kibana-3.1.2</code></p>
  
  <pre><code>2015/02/01 23:05:05 [alert] 3919#0: *766 768 worker_connections are not enough while connecting to upstream, client: 127.0.0.1, server: , request: "GET /kibana-3.1.2 HTTP/1.0", upstream: "http://127.0.0.1:80/kibana-3.1.2", host: "127.0.0.1"
  </code></pre>
  
  <p>Kibana is deployed at <code>/var/www/kibana-3.1.2</code></p>
  
  <p>I have tried to increase the <code>worker_connections</code>,but still no luck,getting below in this case.</p>
  
  <pre><code>2015/02/01 23:02:27 [alert] 3802#0: accept4() failed (24: Too many open files)
  2015/02/01 23:02:27 [alert] 3802#0: accept4() failed (24: Too many open files)
  2015/02/01 23:02:27 [alert] 3802#0: accept4() failed (24: Too many open files)
  2015/02/01 23:02:27 [alert] 3802#0: accept4() failed (24: Too many open files)
  2015/02/01 23:02:27 [alert] 3802#0: accept4() failed (24: Too many open files)
  </code></pre>
  
  <p>nginx.conf :- </p>
  
  <pre><code>user www-data;
  worker_processes 4;
  pid /var/run/nginx.pid;
  
  events {
          worker_connections 768;
          # multi_accept on;
  }
  </code></pre>
  
  <p>And below in the location directive.</p>
  
  <pre><code>location /kibana-3.1.2{
  
          proxy_set_header X-Real-IP  $remote_addr;
  
          proxy_set_header X-Forwarded-For $remote_addr;
  
          proxy_set_header Host $host;
  
          proxy_pass http://127.0.0.1;
  
          add_header Access-Control-Allow-Origin *;
  
          add_header Access-Control-Allow-Headers *;
         }
  </code></pre>