Нулевой код возврата при использовании limit_req

Volkov Oleg nginx at teratelecom.ru
Wed Jun 24 13:10:24 MSD 2009


О данной проблеме я сообщал еще осенью.
Сейчас вынужден опять включить данную функцию и опять получаю нулевые
коды возврата (не 503)
Версия nginx 0.8.4

limit_req_zone $binary_remote_addr zone=reqd:20m rate=5r/s;
limit_req   		zone=reqd  burst=50;

При получении 0 кода возврата само сообщение не проксируется. Переменные
$upstream_addr 
$upstream_response_time 
$upstream_status 
$upstream_cache_status
в логи пишут минус все 4 переменные.

Вот debug

2009/06/24 12:34:21 [debug] 28785#0: *11387 post event 4B3C7938
2009/06/24 12:34:21 [debug] 28785#0: *11387 post event 4B35E938
2009/06/24 12:34:21 [debug] 28785#0: *11387 delete posted event 4B35E938
2009/06/24 12:34:21 [debug] 28785#0: *11387 http empty handler
2009/06/24 12:34:21 [debug] 28785#0: *11387 delete posted event 4B3C7938
2009/06/24 12:34:21 [debug] 28785#0: *11387 http keepalive handler
2009/06/24 12:34:21 [debug] 28785#0: *11387 recv: fd:147 1024 of 1024
2009/06/24 12:34:21 [debug] 28785#0: *11387 malloc: 14D7A548:656
2009/06/24 12:34:21 [debug] 28785#0: *11387 malloc: 14D9C410:4096
2009/06/24 12:34:21 [debug] 28785#0: *11387 http process request line
2009/06/24 12:34:21 [debug] 28785#0: *11387 http request line:
"GET ....... HTTP/1.1"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http uri: "......"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http args: "......."
2009/06/24 12:34:21 [debug] 28785#0: *11387 http exten: "php"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http process request header
line
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "Host: ......."
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "User-Agent:
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4)
Gecko/2008102920 Firefox/3.0.4 (.NET CLR 3.5.30729)"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "Accept:
image/png,image/*;q=0.8,*/*;q=0.5"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header:
"Accept-Language: ru,en-us;q=0.7,en;q=0.3"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header:
"Accept-Encoding: gzip,deflate"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header:
"Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "Keep-Alive:
300"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "Connection:
keep-alive"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "Referer: ..."
2009/06/24 12:34:21 [debug] 28785#0: *11387 http alloc large header
buffer
2009/06/24 12:34:21 [debug] 28785#0: *11387 malloc: 14D3E780:2048
2009/06/24 12:34:21 [debug] 28785#0: *11387 http large header alloc:
14D3E780 2048
2009/06/24 12:34:21 [debug] 28785#0: *11387 http large header copy: 516
2009/06/24 12:34:21 [debug] 28785#0: *11387 recv: fd:147 186 of 1532
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header: "Cookie: ....."
2009/06/24 12:34:21 [debug] 28785#0: *11387 http header done
2009/06/24 12:34:21 [debug] 28785#0: *11387 event timer del: 147:
292018599
2009/06/24 12:34:21 [debug] 28785#0: *11387 generic phase: 0
2009/06/24 12:34:21 [debug] 28785#0: *11387 test location: "/datastore"
2009/06/24 12:34:21 [debug] 28785#0: *11387 test location: "/files"
2009/06/24 12:34:21 [debug] 28785#0: *11387 test location: ~
"(^/.htaccess.*|^/user.html|admin\/(admin.php.*)$)"
2009/06/24 12:34:21 [debug] 28785#0: *11387 test location: ~
"^(.+\.(php|php3|html)|.*/)$"
2009/06/24 12:34:21 [debug] 28785#0: *11387 using configuration
"^(.+\.(php|php3|html)|.*/)$"
2009/06/24 12:34:21 [debug] 28785#0: *11387 http cl:-1 max:10485760
2009/06/24 12:34:21 [debug] 28785#0: *11387 generic phase: 2
2009/06/24 12:34:21 [debug] 28785#0: *11387 post rewrite phase: 3
2009/06/24 12:34:21 [debug] 28785#0: *11387 generic phase: 4
2009/06/24 12:34:21 [debug] 28785#0: *11387 limit_req: -2 0.760
2009/06/24 12:34:21 [warn] 28785#0: *11387 delaying request, excess:
0.760, by zone "reqd", client: 81.177.14.146, server:
tech.support.4game.ru, request: "GET ... HTTP/1.1", host: "...",
referrer: "..."
2009/06/24 12:34:21 [debug] 28785#0: *11387 event timer add: 147:
760:291946626
2009/06/24 12:34:21 [debug] 28785#0: *11387 http run request: "..."
2009/06/24 12:34:21 [debug] 28785#0: *11387 http test reading
2009/06/24 12:34:21 [info] 28785#0: *11387 client closed prematurely
connection, client: 81.177.14.146, server: ..., request: "GET ...
HTTP/1.1", host: "...", referrer: "..."
2009/06/24 12:34:21 [debug] 28785#0: *11387 http finalize request: 0,
"..." 1
2009/06/24 12:34:21 [debug] 28785#0: *11387 http close request
2009/06/24 12:34:21 [debug] 28785#0: *11387 http log handler
2009/06/24 12:34:21 [debug] 28785#0: *11387 parse header: "Cookie: ..."
2009/06/24 12:34:21 [debug] 28785#0: *11387 uid cookie:
"X4H4WkpBwvwrPG1DAy8QAg=="
2009/06/24 12:34:21 [debug] 28785#0: *11387 uid:
5AF8815FFCC2414A436D3C2B02102F03
2009/06/24 12:34:21 [debug] 28785#0: *11387 free: 14D9C410, unused: 1847
2009/06/24 12:34:21 [debug] 28785#0: *11387 close http connection: 147
2009/06/24 12:34:21 [debug] 28785#0: *11387 event timer del: 147:
291946626
2009/06/24 12:34:21 [debug] 28785#0: *11387 free: 14D24D48
2009/06/24 12:34:21 [debug] 28785#0: *11387 free: 14D7A548
2009/06/24 12:34:21 [debug] 28785#0: *11387 free: 14D3E780
2009/06/24 12:34:21 [debug] 28785#0: *11387 free: 14CE3DC8, unused: 16
2009/06/24 12:34:21 [debug] 28785#0: *11387 free: 14D253E8, unused: 136


-- 
С уважением,
Волков Олег







More information about the nginx-ru mailing list