Forum: NGINX setting max active connection

2974d09ac2541e892966b762aad84943?d=identicon&s=25 vikas (Guest)
on 2013-07-18 12:48
(Received via mailing list)
How to increase max active connection limits from default 520.
System configuration CentOS release 5.8 (Final) with whm.

nginx conf file is

user nginx root;
worker_processes 16;
worker_rlimit_nofile 200000;
worker_connections 10240;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events { worker_connections 10240; use epoll; }
http { include /etc/nginx/mime.types; default_type
application/octet-stream;
index index.php index.htm index.html; log_format main '$remote_addr -
$remote_user [$time_local] "$request" ' '$status $body_bytes_sent
"$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
access_log off;

sendfile        on;
tcp_nopush      on;
tcp_nodelay     on;
server_tokens   off;
gzip            on;
gzip_static     on;
gzip_comp_level 5;
gzip_min_length 10240;
keepalive_timeout  30;
keepalive_requests 100000;
limit_conn_zone   $binary_remote_addr  zone=addr:10m;

include /etc/nginx/conf.d/*.conf;
server {
    limit_conn addr 20000;
    listen       7007;
    server_name  _;
        root   /usr/share/nginx/html;
    location / {
root /usr/share/nginx/html;
index index.html index.htm;
    }

    error_page  404              /404.html;

    location = /404.html {
root /usr/share/nginx/html;
    }
  location /favicon.ico {
      empty_gif;
  }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
root /usr/share/nginx/html;
    }
    location ~ \.php$ {
root /usr/share/nginx/html;
        fastcgi_pass   unix:/tmp/php.sock;
        fastcgi_index  index.php;
      fastcgi_send_timeout  8m;
      fastcgi_read_timeout 8m;
      fastcgi_connect_timeout 8m;
      include /etc/nginx/fastcgi.conf;
    }

  location /status {
        stub_status on;
          access_log   off;
     }
} }

/proc/sys/net/ipv4/ip_local_port_range 9000 65535
/proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_time_wait 1

If any other information need pls tell me.
I am not able to find where I have to set max active connection limit
for
nginx in the conf.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240989,240989#msg-240989
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-07-18 13:16
(Received via mailing list)
you config is somewhat messed_up, but it think this is not an issue
here.

are you sure your fastcgi_process is able to deliver more than 520
parallel
connections?


http://wiki.nginx.org/EventsModule#worker_connections -> to be defined
in
event {}

max clients = worker_processes * worker_connections

In a reverse proxy situation, max clients becomes

max clients = worker_processes * worker_connections/4

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240989,240991#msg-240991
2974d09ac2541e892966b762aad84943?d=identicon&s=25 vikas (Guest)
on 2013-07-18 13:53
(Received via mailing list)
This is the php-fastcgi file,

/usr/bin/spawn-fcgi -s /tmp/php.sock -M 0666 -C 9 -u nginx -g nginx -U
nginx
-G nginx -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid

And in this file I didn't restrict parallel connections to 520.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240989,240994#msg-240994
2974d09ac2541e892966b762aad84943?d=identicon&s=25 mex (Guest)
on 2013-07-18 21:23
(Received via mailing list)
your ngfinx-config seems ok (except that part that should be deleted
from
global-section and
appear only in event {...}


can you test your fastcgi_process with ab (apache benchmark - tool) oder
httperf until
you reach max_clients w/out reverse_proxying through nginx?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240989,241011#msg-241011
2974d09ac2541e892966b762aad84943?d=identicon&s=25 rolf1316 (Guest)
on 2015-04-13 11:54
(Received via mailing list)
is it possible to edit the limit of active connections in nginx? Like
change
it to 5 active connections at a time ?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240989,257987#msg-257987
1266aa99d1601b47bbd3ec22affbb81c?d=identicon&s=25 B.R. (Guest)
on 2015-04-13 18:22
(Received via mailing list)
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.