Is there a way to configure nginx not to block request from a specific IP address?

Hi

I’d like do some static file tests on nginx, because I’d like to use
nginx as my static file server

so I wrote a loop(500000 loops) to send request and retrive response
from nginx through a 100M speed network (LAN),

I used apache httpclient to connect to nginx, after only 4 loops, the
httpclient throws exception:

org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for
connection

and the client could never connect to nginx again.

it looks like nginx blocked the request from my httpclient, I think
maybe it is because I send too many requests to nginx at the same time,
so could you please tell me is there a way to configure nginx not to
block request from a specific IP address? I just had too many files to
test, I don want to set some interval time between my requests, that
will cost me weeks to finish the test. Thanks a lot!

Posted at Nginx Forum:

here is my conf file , the nginx version is 0.7.36
I just used the default config.

worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile        on;

keepalive_timeout  0;


server {
    listen       80;
    server_name  localhost;



    location / {

        root   html;
        index  index.html index.htm;
    }


    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
       root   /web;
       #root    html;
    }

   }
}

Posted at Nginx Forum:

Igor S. Wrote:

events {
sendfile on;
location / {
}
Igor Sysoev
thanks,
my bad, it is because I did not change the net bind parameter in windows
regedit,( I connect to a linux virtual machine from my windows machine).
and it works now, all request could be responsed.
but I found another question is that when I put about 50000 static
files(all files are less than 1k bytes) under the linux machine folder,
I can run at about 240 requests per second, but after I put 1 million
files under that folder and still I run the same loops, I can only run
at 95 request per second, why does that happen? is there something
specific I need to set in nginx or I need to change some settings in the
linux envrioment?(my test linux machine system: ubuntu LTS 8.04 on
vmware single processor, p4 2.8g, 7200rpm, a normal machine, the ulimit
-n is 1024)

Posted at Nginx Forum:

machineatube Wrote:

run the same loops, I can only run at 95 request
per second, why does that happen? is there
something specific I need to set in nginx or I
need to change some settings in the linux
envrioment?(my test linux machine system: ubuntu
LTS 8.04 on vmware single processor, p4 2.8g,
7200rpm, a normal machine, the ulimit -n is 1024)

the performance down turn does nothing with nginx,
it is a os issue, after I added an 1g memory to the virtual machine
the system can run at about 398 request per second now,
the speed can only be much higher in a real server machine,

Posted at Nginx Forum:

On Thu, Sep 17, 2009 at 03:56:20AM -0400, machineatube wrote:

    }

   
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
       root   /web;
       #root    html;
    }

   }
}

Here is nothing that may prevent processing more than 4 requests.