Welcome! Log In Create A New Profile

Advanced

Nginx 1.4.4-4 / limit_conn / limit rate

Posted by chainsaw-penguin 
Nginx 1.4.4-4 / limit_conn / limit rate
February 14, 2014 07:54PM
Dear honorable members,

I switched recently from Apache / Debian to Nginx / Debian and
i'm struggling a bit right now. I hope to find some help in this forum.

System info:
Nginx-Full 1.4.4-4 / Debian Jessie

Goal:
Limit the connections per IP to 1 with a limited bandwith (20 Megabit/s) for every connection.

Done so far:
nginx.conf:
limit_conn_zone $binary_remote_addr zone=addr:10m;

in the location block:
limit_conn addr 1;
limit_rate 2621440;

I see a lot of entries in the error.log looking like this:

limiting connections by zone addr ...

I assume, that the limit_conn is working, but people are still downloading with 100 MBit/s or more. Im stuck and would really appreciate some advice.

Thank you in advance.
Re: Nginx 1.4.4-4 / limit_conn / limit rate
February 21, 2014 03:38PM
Addendum:

Upgraded to Nginx 1.4.5-1, but nothing changed. The limit_rate directive is still not working.
Re: Nginx 1.4.4-4 / limit_conn / limit rate
March 04, 2014 03:19AM
What if you put "limit_rate 2621440;" in the server block instead of location?
Re: Nginx 1.4.4-4 / limit_conn / limit rate
March 04, 2014 05:35AM
I tried that with the 1.4.4 Nginx and it did not wotk but i give it a shot with 1.4.5. Just wrote it into the server block right below the index directive. I will monitor the situation and get bacl to you.
Re: Nginx 1.4.4-4 / limit_conn / limit rate
March 07, 2014 02:39PM
Does not work with 1.4.5 either :-(



Edited 1 time(s). Last edit at 03/07/2014 02:40PM by chainsaw-penguin.
Re: Nginx 1.4.4-4 / limit_conn / limit rate
March 16, 2014 03:36PM
Upgraded to 1.4.6 and it still does not work. I give it up with that feature.
Re: Nginx 1.4.4-4 / limit_conn / limit rate
March 16, 2014 04:10PM
Try a simple google: https://www.google.nl/#q=nginx%20limit%20bandwidth%20per%20connection

The first page gives plenty of solutions, even a module https://github.com/bigplum/Nginx-limit-traffic-rate-module

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: Nginx 1.4.4-4 / limit_conn / limit rate
August 24, 2014 10:27AM
It's an old post but I am looking for a solution to this.
I installed nginx with the following command:
yum install nginx -y
on centos 6.5. Now how do I add this module to nginx config..
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
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