<html>
<head>
<meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Добавьте "proxy_cache_lock on;".<br>
<br>
<a class="moz-txt-link-freetext" href="http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_cache_lock">http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_cache_lock</a><br>
<br>
<br>
<div class="moz-cite-prefix">05/04/14 16:10 , justcyber пишет:<br>
</div>
<blockquote
cite="mid:78d9fed8d1b7dbd9966290320c30bdfa.NginxMailingListRussian@forum.nginx.org"
type="cite">
<pre wrap="">Имеется конструкция для кеширования всего сайта:
proxy_cache_path /var/cache/nginx/cache levels=2:2
keys_zone=memproxy:10m max_size=3072m inactive=3h;
proxy_temp_path /var/cache/nginx/proxy;
proxy_cache_key "$scheme://$host$request_uri";
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_valid 200 301 302 304 1m;
proxy_cache_valid 404 502 503 1m;
proxy_cache_methods GET HEAD POST;
client_max_body_size 255M;
location / {
limit_conn perip 80;
limit_req zone=hostreqlimit burst=1100 nodelay;
default_type text/html;
proxy_pass <a class="moz-txt-link-freetext" href="http://127.0.0.1:81">http://127.0.0.1:81</a>;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_buffers 256 4k;
proxy_max_temp_file_size 0k;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header realip $remote_addr;
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache memproxy;
add_header X-Cache-Status $upstream_cache_status;
}
Однако каждую минуту на бэкенд (который proxy_pass <a class="moz-txt-link-freetext" href="http://127.0.0.1:81">http://127.0.0.1:81</a>;)
поступает вместо одного запроса для главной страницы, штук 50-300. В чем
может быть проблема?
Posted at Nginx Forum: <a class="moz-txt-link-freetext" href="http://forum.nginx.org/read.php?21,249033,249033#msg-249033">http://forum.nginx.org/read.php?21,249033,249033#msg-249033</a>
_______________________________________________
nginx-ru mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx-ru">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<table border="0">
<tbody>
<tr>
<td style="font-family: Arial; font-size: 12px;"
width="300px" valign="top">
<br>
C уважением,<br>
Илья Иванцов
<table border="0" cellspacing="0">
<tbody>
<tr>
<td style="font-family: Arial; font-size: 12px;
color: #b0b0b0;">m.</td>
<td style="font-family: Arial; font-size: 12px;">+7
(495) 766-1562</td>
</tr>
<tr>
<td style="font-family: Arial; font-size: 12px;
color: #b0b0b0;">t.</td>
<td style="font-family: Arial; font-size: 12px;">
+7 (495) 737-5743 (ext. 711)
</td>
</tr>
<tr>
<td style="font-family: Arial; font-size: 12px;
color: #b0b0b0;">e.</td>
<td style="font-family: Arial; font-size: 12px;"><a class="moz-txt-link-abbreviated" href="mailto:i.ivantsov@ngenix.net">i.ivantsov@ngenix.net</a></td>
</tr>
</tbody>
</table>
<br>
<strong>NGENIX <span style="color: #f8aa6a;">\</span>\
Российский оператор CDN</strong>
<br>
<div style="margin: 2px 0 14px;">
<a href="mailto:support@ngenix.net" style="color:
#f8aa6a;">support@ngenix.net</a> | <a
href="http://www.ngenix.net" style="color: #0000ff;">www.ngenix.net</a>
</div>
<div style="margin: 3px 0; font-weight: bolder">
<span style="font-weight: normal;">Follow @ </span><a
href="http://twitter.com/#%21/ngenix"
style="background-color: #00bbf5; color: white;
padding: 2px; margin: 0 2px;">twitter</a><span
style="margin: 0 2px;font-weight: normal;">|</span><a
href="http://www.facebook.com/ngenix.net"
style="background-color: #3B5998; color: white;
padding: 2px; margin: 0 2px; ">facebook</a><span
style="margin: 0 2px;font-weight: normal;">|</span><a
href="http://www.linkedin.com/company/2305841"
style="color: white; margin: 0 2px;
text-decoration:none"><span
style="background-color:#606060; padding: 2px; ">Linked</span><span
style="background-color:#0073B2; padding:
2px;text-decoration:underline;">in</span></a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>