<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=KOI8-R" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Maxim Dounin ÐÉÛÅÔ:
<blockquote cite="mid:20091018225358.GA1144@mdounin.ru" type="cite">
  <pre wrap="">Hello!

On Sun, Oct 18, 2009 at 02:13:40AM +0300, óÔÁÎÉÓÌÁ× wrote:

[...]

  </pre>
  <blockquote type="cite">
    <pre wrap="">   × ÅÒÒÏÒ ÌÏÇÅ ×ÙÄÁÅÔÓÑ ÔÁËÏÅ:

   2009/10/18 03:01:03 [warn] 28243#0: *11692 delaying request, excess:
          0.118, by zone "qraagarphp", client: 94.244.156.213, server:
          xxxxx.xx, request: "GET
          /forum/style.php?sid=ba7bb6c7f099ea2536f223af61b66790&amp;id=1&amp;lang=
          en HTTP/1.1", host: "xxxxx.xx", referrer:
          [2]<a class="moz-txt-link-rfc2396E" href="http://xxxxx.xx/forum/index.php?">"http://xxxxx.xx/forum/index.php?"</a>

   2009/10/18 03:01:03 [warn] 28243#0: *11692 an upstream response is
          buffered to a temporary file
          /var/spool/nginx/fastcgi_temp/0000000020 while reading upstream,
          client: 94.244.156.213, server: xxxxx.xx, request: "GET
          /forum/style.php?sid=ba7bb6c7f099ea2536f223af61b66790&amp;id=1&amp;lang=
          en HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:",
          host: "xxxxx.xx", referrer:
          [3]<a class="moz-txt-link-rfc2396E" href="http://xxxxx.xx/forum/index.php?">"http://xxxxx.xx/forum/index.php?"</a>

   2009/10/18 03:01:03 [info] 28243#0: *11692 client timed out (110:
          Connection timed out) while sending to client, client:
          94.244.156.213, server: xxxxx.xx, request: "GET
          /forum/style.php?sid=ba7bb6c7f099ea2536f223af61b66790&amp;id=1&amp;lang=
          en HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:",
          host: "xxxxx.xx", referrer:
          [4]<a class="moz-txt-link-rfc2396E" href="http://xxxxx.xx/forum/index.php?">"http://xxxxx.xx/forum/index.php?"</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
[...]

  </pre>
  <blockquote type="cite">
    <pre wrap="">   óÐÁÓÔÉ ÜÔÕ ÓÉÔÕÁÃÉÀ ÕÄÁÌÏÓØ ÐÒÉÂÁ×É× nodaley Ë limit_req
          zone=qraagarphp burst=1

   îÏ ÜÔÏ, ÍÎÅ ËÁÖÅÔÓÑ, ÎÅ ×ÙÈÏÄ, Ô.Ë. ÄÄÏÓÉÔØ ÂÕÄÕÔ(

   nginx/0.7.61 + php-fpm
    </pre>
  </blockquote>
  <pre wrap=""><!---->
÷ 0.7.61 limit_req Ó ÚÁÄÅÒÖËÏÊ ÎÅ ÒÁÂÏÔÁÅÔ, ÅÓÌÉ ÏÔ×ÅÔ ÎÅ 
ÐÏÍÅÝÁÅÔÓÑ ÃÅÌÉËÏÍ × ÂÕÆÅÒ ÓÏËÅÔÁ.  ÷ 0.8.* ÕÖÅ ÅÓÔØ ÆÉËÓ:

Changes with nginx 0.8.5:

....

   *) Bugfix: in ngx_http_limit_req_module.

....

ìÉÂÏ ÉÓÐÏÌØÚÏ×ÁÔØ limit_req ... nodelay, ÌÉÂÏ ÎÁËÌÁÄÙ×ÁÔØ ÐÁÔÞ 
ÒÕËÁÍÉ.

Maxim Dounin


  </pre>
</blockquote>
óÐÁÓÉÂÏ ÏÇÒÏÍÎÏÅ ÚÁ ÏÔ×ÅÔ=)<br>
<br>
ðÁÔÞÉË ÎÁÌÏÖÉÔØ ×ÏÔ ÜÔÏÔ?<br>
<blockquote type="cite">line diff<br>
šššš 1.1 --- a/src/http/modules/ngx_http_limit_req_module.cšš šTue Jun
02 00:00:00 2009 +0400<br>
šššš 1.2 +++ b/src/http/modules/ngx_http_limit_req_module.cšš šMon Jul
13 00:00:00 2009 +0400<br>
šššš 1.3 @@ -181,7 +181,7 @@<br>
šššš 1.4ššššš }<br>
šššš 1.5 š<br>
šššš 1.6ššššš ngx_log_debug3(NGX_LOG_DEBUG_HTTP,
r-&gt;connection-&gt;log, 0,<br>
šššš 1.7 -ššššššššššššššššš "limit_req: %i %ui.%03ui", rc, excess /
1000, excess % 1000);<br>
šššš 1.8 +šššššššššššššššššš "limit_req: %i %ui.%03ui", rc, excess /
1000, excess % 1000);<br>
šššš 1.9 š<br>
ššš 1.10ššššš if (rc == NGX_BUSY) {<br>
ššš 1.11ššššššššš ngx_shmtx_unlock(&amp;ctx-&gt;shpool-&gt;mutex);<br>
ššš 1.12 @@ -263,8 +263,23 @@<br>
ššš 1.13š static void<br>
ššš 1.14š ngx_http_limit_req_delay(ngx_http_request_t *r)<br>
ššš 1.15š {<br>
ššš 1.16 +ššš ngx_event_tš *wev;<br>
ššš 1.17 +<br>
ššš 1.18ššššš ngx_log_debug0(NGX_LOG_DEBUG_HTTP,
r-&gt;connection-&gt;log, 0,<br>
ššš 1.19 -ššššššššššššššššš "limit_req delay");<br>
ššš 1.20 +šššššššššššššššššš "limit_req delay");<br>
ššš 1.21 +<br>
ššš 1.22 +ššš wev = r-&gt;connection-&gt;write;<br>
ššš 1.23 +<br>
ššš 1.24 +ššš if (!wev-&gt;timedout) {<br>
ššš 1.25 +<br>
ššš 1.26 +ššššššš if (ngx_handle_write_event(wev, 0) != NGX_OK) {<br>
ššš 1.27 +ššššššššššš ngx_http_finalize_request(r,
NGX_HTTP_INTERNAL_SERVER_ERROR);<br>
ššš 1.28 +ššššššš }<br>
ššš 1.29 +<br>
ššš 1.30 +ššššššš return;<br>
ššš 1.31 +ššš }<br>
ššš 1.32 +<br>
ššš 1.33 +ššš wev-&gt;timedout = 0;<br>
ššš 1.34 š<br>
ššš 1.35ššššš if (ngx_handle_read_event(r-&gt;connection-&gt;read, 0)
!= NGX_OK) {<br>
ššš 1.36ššššššššš ngx_http_finalize_request(r,
NGX_HTTP_INTERNAL_SERVER_ERROR);</blockquote>
<br>
</body>
</html>