Welcome! Log In Create A New Profile

Advanced

bug in limit_req

March 05, 2012 09:56AM
Hello,

limit_req does not work with Nginx 1.1.16 - if used on different levels.
`for a in `seq 300`; do wget -O /dev/null http://localhost:8081/; done`
Exepected result: 503, result is always "502 bad gateway".
Down below the config file.

Thanks a lot




error_log /tmp/nginx-error_log info;
pid /tmp/nginx.pid;
events {
worker_connections 65535;
}

http {
default_type application/octet-stream;

limit_req_zone $binary_remote_addr zone=everything_ip:32m rate=50r/s;
limit_req zone=everything_ip burst=50;

limit_req_zone $binary_remote_addr zone=fastcgi_ip:32m rate=2r/s;

server {
listen *:8081;
root /tmp/www;

# fastcgi
location @backend {
limit_req zone=fastcgi_ip burst=10;
fastcgi_pass unix:/tmp/nginx.dispatch.sock;
}

# static
location / {
try_files $uri @backend;
expires max;
}
}
}
Subject Author Posted

bug in limit_req

double March 05, 2012 09:56AM

Re: bug in limit_req

Maxim Dounin March 05, 2012 11:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready