Valentin Bartenev
86dd5bde45
Added three missing checks for NULL after ngx_array_push() calls.
...
Found by Coverity.
2012-08-08 12:03:46 +00:00
Ruslan Ermilov
b74f8ffce4
Fixed spelling in single-line comments.
2012-02-28 11:31:05 +00:00
Maxim Dounin
7ca6c1ff78
Fix of rbtree lookup on hash collisions.
...
Previous code incorrectly assumed that nodes with identical keys are linked
together. This might not be true after tree rebalance.
Patch by Lanshun Zhou.
2012-02-27 22:15:39 +00:00
Maxim Dounin
11cc9dac44
Limit req: unbreak compilation with MSVC.
2012-01-30 13:19:25 +00:00
Valentin Bartenev
b06200f3dc
Limit req: support for multiple "limit_req" limits.
2012-01-30 10:17:56 +00:00
Valentin Bartenev
73d0b6a721
Limit req: number of cleanup calls reduced.
...
Doing a cleanup before every lookup seems to be too aggressive. It can lead to
premature removal of the nodes still usable, which increases the amount of work
under a mutex lock and therefore decreases performance.
In order to improve cleanup behavior, cleanup function call has been moved right
before the allocation of a new node.
2012-01-30 10:01:39 +00:00
Valentin Bartenev
8dab3b5a39
Limit req: allocation and initialization of a new node moved to the lookup
...
function.
No functional changes.
2012-01-30 09:41:49 +00:00
Valentin Bartenev
5f5205ba87
Limit req: improved error handling when parsing "zone" parameter of
...
"limit_req_zone" directive; minimum size of zone is increased.
Previously an unsigned variable was used to keep the return value of
ngx_parse_size() function, which led to an incorrect zone size if NGX_ERROR
was returned.
The new code has been taken from the "limit_conn_zone" directive.
2012-01-30 09:26:08 +00:00
Valentin Bartenev
d4dbf6ad59
Limit req: error messages fixed.
2012-01-30 09:02:29 +00:00
Maxim Konovalov
f8d59e33f3
Copyright updated.
2012-01-18 15:07:43 +00:00
Maxim Dounin
f2ef9db230
Fixed limit_req burst/nodelay inheritance (ticket #76 ).
...
The problem was introduced in r4381 (1.1.12).
2012-01-11 11:09:05 +00:00
Valentin Bartenev
39f01e526f
Fixed limit_conn_log_level/limit_req_log_level inheritance.
...
The directives did not work if there were no limit_conn/limit_req specified on
the same level.
2011-12-25 19:32:31 +00:00
Igor Sysoev
c5d1790e1d
change order of limit_req lookup result processing
2010-10-14 09:20:01 +00:00
Igor Sysoev
622721a598
an excess was logged as 0.000 if requests were limited without delay:
...
*) use a real excess value instead of non-updated limit_req rbtree node field,
*) move inactivity queue handling inside ngx_http_limit_req_lookup()
since the node is not required outside the lookup function;
the bug has been introduced in r3184
2010-10-13 20:58:41 +00:00
Igor Sysoev
fbb262533f
fix delay in limit_req
2010-05-24 07:43:39 +00:00
Igor Sysoev
4efbd6ab36
fix r3184
2009-10-06 16:08:15 +00:00
Igor Sysoev
6624c62742
limit_req_log_level
2009-10-06 10:14:21 +00:00
Igor Sysoev
5d4b802370
make limit_req to conform to the leaky bucket algorithm
2009-10-06 09:37:18 +00:00
Igor Sysoev
d6bb7ea591
style fix
2009-07-09 14:03:12 +00:00
Igor Sysoev
a4eb3f0e02
fix client write event handling in ngx_http_limit_req_module
2009-07-09 14:02:09 +00:00
Igor Sysoev
260c4321d7
return NULL instead of NGX_CONF_ERROR on a create conf failure
2009-06-02 16:09:44 +00:00
Igor Sysoev
f7a08d5f9a
support attaching to an existent Win32 shared memory
2009-04-18 19:27:28 +00:00
Igor Sysoev
c7f876bd4c
move zone name from ngx_shm_zone_t to ngx_shm_t to use Win32 shared memory
2009-04-16 19:25:09 +00:00
Igor Sysoev
2766157b02
delete duplicate error logging
2009-03-27 19:32:55 +00:00
Igor Sysoev
a2c8d9a0a8
improve ngx_slab_alloc() error logging
2009-03-27 17:00:42 +00:00
Igor Sysoev
ba206e147c
*) add zone name while logging 503 error reason
...
*) log allocation error as 503 error reason
2008-12-08 14:18:06 +00:00
Igor Sysoev
54fd0bb613
update comment
2008-12-08 14:15:19 +00:00
Igor Sysoev
61591d111f
rename "lz" to "lr" in variable names
2008-12-08 14:13:36 +00:00
Igor Sysoev
b4407c27cb
use integer instead of float
2008-11-14 13:25:44 +00:00
Igor Sysoev
c3d5410c77
change rate to an excess
2008-11-14 11:32:03 +00:00
Igor Sysoev
40cc949c7b
*) correct leaky bucket implementation
...
*) now burst is not per second
*) remove delay= parameter
*) add nodelay parameter
2008-11-11 15:38:16 +00:00
Igor Sysoev
abe378e820
ngx_http_limit_req_module
2008-11-10 15:22:33 +00:00