About the number of Nginx concurrent connections

Source: Internet
Author: User

About the number of Nginx concurrent connections

Recently in learning to use Nginx, do some simple stress test, found that the maximum number of concurrent connections can only up to more than 100

The state at the beginning of the test,

    1. Netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '
    2. Close_wait 2
    3. Established 133
    4. SYN_RECV 39
Copy Code

Then the connection to the SYN_RECV state has risen

    1. Netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '
    2. Close_wait 2
    3. Established 133
    4. SYN_RECV 124
Copy Code

Lasted until the test was finished.

Here is my configuration

    1. Worker_processes 10;
    2. Worker_rlimit_nofile 51200;
    3. daemon on;
    4. Master_process off;
    5. Error_log/home/test/apps/nginx/logs/nginx-error.log Debug;
    6. Pid/tmp/nginx_demo.pid;
    7. Events {
    8. Worker_connections 51200;
    9. }
    10. HTTP {
    11. Include/home/test/apps/nginx/conf/mime.types;
    12. Sendfile on;
    13. Keepalive_timeout 65;
    14. Tcp_nodelay on;
    15. server {
    16. Listen 8100;
    17. server_name localhost;
    18. Access_log/home/test/apps/nginx/logs/access.log;
    19. Error_log/home/test/apps/nginx/logs/error.log Debug;
    20. Location/lottery_image {
    21. Lig "Hi,this is a demo module";
    22. }
    23. }
    24. }
    25. ~

About the number of Nginx concurrent connections

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.