ruby on rails 3.2 - Nginx configuration resulting in too many connections -


in attempt implement upload progress module, following server configuration resulting in too many open files error

2014/11/19 12:10:34 [alert] 31761#0: *1010 socket() failed (24: many open files) while connecting upstream, client: 127.0.0.1, server: xxx, request: "get /documents/15/edit http/1.0", upstream: "http://127.0.0.1:80/documents/15/edit", host: "127.0.0.1" 2014/11/19 12:10:34 [crit] 31761#0: *1010 open() "/usr/share/nginx/html/50x.html" failed (24: many open files), client: 127.0.0.1, server: xxx, request: "get /documents/15/edit http/1.0", upstream: "http://127.0.0.1:80/documents/15/edit", host: "127.0.0.1" 

the following relevant part of server bloc generating conflict passenger_enabled on; rails_env development; root /home/user/app/current/public;

    # redirect server error pages static page /50x.html     error_page   500 502 503 504  /50x.html;     location = /50x.html {         root   html;     }      location / {         # proxy upstream server         proxy_pass http://127.0.0.1;         proxy_redirect default;          # track uploads in 'proxied' zone         # remember connections 30s after finished         track_uploads proxied 30s;     }      location ^~ /progress {         # report uploads tracked in 'proxied' zone         report_uploads proxied;     } 

being relative n00b nginx, not comprehend generating many files error. assumed error pages 500-504 server errors...

first check , increase open files limit in root shell (system-wide, 1024 usually):

# ulimit -n # ulimit -n 16384 

then can increase nginx's open files limit (main context, top of nginx.conf):

worker_rlimit_nofile 16384 

then restart nginx )

if not help, check more detail solutions like

nginx: 24: many open files error , solution


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -