Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm doing some tests with nginx 1.4.1 and Node.js 0.10.5 on my development machine (P8700 Dual Core 2.53Ghz, 4Gb RAM running Xubuntu x64). Unfortunately I can't do ab with 100000 requests with a concurrency of 1000. I get this error after a fraction of the total:

apr_socket_recv: Connection reset by peer (104)

Total of 17641

Configuration file seems fine to me (2 workers, each handling 1024 connections at maximum):

worker_processes 2;

events {
    worker_connections  1024;
}


http {
    include           mime.types;
    default_type      application/octet-stream;
    sendfile          on;
    keepalive_timeout 65;

    upstream node_upstream {
        server 127.0.0.1:3000;
        server 127.0.0.1:3001;
    }

    server {
        listen       80;
        server_name  localhost;

        location / {
            proxy_redirect off;
            proxy_pass     http://node_upstream;
        }
    }
}

Workers are online (ps aux | grep nginx):

root     20833  0.0  0.0  22404  1292 ?        Ss   22:08   0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/balancer.conf
nobody   21022  0.7  0.0  22916  1784 ?        S    22:15   0:03 nginx: worker process                                             
nobody   21023  0.7  0.0  22916  1784 ?        S    22:15   0:03 nginx: worker process 

I don't think it's something related to my OS installation: I can do the same test with a Node.js cluster and it completes fine. Test completes with nginx and ab -n 10000 -c 100.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.