bug in nginx-0.8.28
Paul Roland
paul.roland at yahoo.com
Thu Nov 26 21:48:58 MSK 2009
I gave up on that module caused slow requests.
The limitzone one still ignores settings.
Here is my config, I consider it correct.
You can try youself on that ip and see that limitations do not work.
user btnws trust;
worker_processes 10;
events {
worker_connections 10240;
use epoll;
}
http {
include /etc/mime.types;
default_type application/octet-stream;
access_log off;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128;
autoindex on;
error_page 404 /btnerror/404.html;
log_not_found off;
server_tokens off;
gzip on;
gzip_min_length 500;
gzip_comp_level 9;
gzip_static on;
gzip_http_version 1.1;
gzip_vary on;
client_max_body_size 32m;
limit_zone one $binary_remote_addr 10m;
server {
listen 86.55.211.150:80;
server_name df.btn.ro;
root /pdb/pub;
location / {
limit_conn one 10;
fancyindex on;
fancyindex_exact_size off;
fancyindex_localtime on;
index index.html index.htm index.php;
location ~ \.php {
include /etc/fastcgi.conf;
fastcgi_pass unix:/opt/httpd/php.sock;
}
--- On Thu, 11/26/09, Maxim Dounin <mdounin at mdounin.ru> wrote:
> From: Maxim Dounin <mdounin at mdounin.ru>
> Subject: Re: bug in nginx-0.8.28
> To: nginx at nginx.org
> Date: Thursday, November 26, 2009, 2:00 PM
> Hello!
>
> On Thu, Nov 26, 2009 at 03:28:22AM -0800, Paul Roland
> wrote:
>
> > requests with no pauses using apache's benchmark.
>
> With concurrency == 1 (ab -c 1, the default)? So it's
> expected
> result, not a bug.
>
> > I need a way to limit 5 connections per ip.
> >
> > also tried:
> >
> > limit_zone one
> $binary_remote_addr 10m;
> > limit_conn one 5;
> >
> > this setting is completely ignored for some reasons.
>
> If you try to do this while having "limit_req_zone ...
> zone=one:10m ..." in config, you should see something like
> this
> while starting nginx or testing configuration:
>
> [emerg]: the shared memory zone "one" is already declared
> for a different use in ...
>
> I believe this message is self-explaining.
>
> Note well: limit_conn limits number of connections which
> process
> requests (not just established/kept alive connections, and
> not
> even connections reading request headers). It's
> effect usually
> can't be seen while testing against small static file (as
> request
> processing happens in one turn here).
>
> Maxim Dounin
>
> >
> > --- On Thu, 11/26/09, Maxim Dounin <mdounin at mdounin.ru>
> wrote:
> >
> > > From: Maxim Dounin <mdounin at mdounin.ru>
> > > Subject: Re: bug in nginx-0.8.28
> > > To: nginx at nginx.org
> > > Date: Thursday, November 26, 2009, 1:08 PM
> > > Hello!
> > >
> > > On Thu, Nov 26, 2009 at 12:20:20AM -0800, Paul
> Roland
> > > wrote:
> > >
> > > > I have:
> > > >
> > > >
> > > limit_req_zone
> > > $binary_remote_addr
> > > zone=one:10m rate=5r/s;
> > > >
> > > limit_req zone=one
> > > burst=5;
> > > >
> > > > in http zone.
> > > >
> > > > whatever changes I make ot that directive
> even if I
> > > set 100/s won't serve more than 2 requests per
> second.
> > > >
> > > > maybe Im doing it wrong?
> > >
> > > Are you testing it with single stream of requests
> without
> > > pauses
> > > between them?
> > >
> > > In this case result of 2 reqs/second is somewhat
> expected,
> > > since
> > > every second request will be delayed for
> something like 1
> > > second
> > > as it follows previous request immediately.
> > >
> > > Maxim Dounin
> > >
> > > _______________________________________________
> > > nginx mailing list
> > > nginx at nginx.org
> > > http://nginx.org/mailman/listinfo/nginx
> > >
> >
> >
> >
> >
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
More information about the nginx
mailing list