<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Здравствуйте,</blockquote><div><b><br></b></div><div>Имеется следующий nginx:</div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
$ nginx -V</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
nginx version: nginx/0.7.65</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
built by gcc 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_stub_status_module --add-module=/home/avasilenko/nginx-patched/memcached_hash/</blockquote>
</div><div><b><br></b></div><div><b><span class="Apple-style-span" style="font-weight: normal; "><div><div>log_format aws '$remote_addr - $remote_user [$time_local] "$request" ($request_time) - $upstream_status $upstream_addr $body_bytes_sent "$http_referer" "$http_user_agent"';</div>
</div></span></b></div><div><b><br></b></div><div>Стоит memcached_hash + сопутствующие ему патчи. Проблемы возникают редко (1 на 50000 запросов). Приходит непонятный ответ от memcached:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
213.137.108.91 - - [27/Mar/2010:07:23:21 +0800] "GET /actions/getlastdownloads.json?timestamp=1269645530 HTTP/1.1" (0.000) - - <a href="http://192.168.1.14:11211">192.168.1.14:11211</a> 0 "<a href="http://www.savevid.com/">http://www.savevid.com/</a>" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5"</blockquote>
</div><div><b><br></b></div><div>Получается, что мемкеш отправляет невалидный заголовок и nginx соответственно возвращает пустой ответ.</div><div><br></div><div>Тоже самое актуально, если вместо memcached использовать memcachedb, только процент ошибочных запросов значительно больше (1 на 400).</div>
<div>Симптомы похожи, как две капли воды:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
150.176.249.100 - - [27/Mar/2010:03:53:20 +0800] "GET /video/young-money-lil-chuckie-lil-twist-girl-i-got-you-official-music-video.html HTTP/1.1" (0.026) - - <a href="http://192.168.1.14:21201">192.168.1.14:21201</a> 0 "<a href="http://www.google.com/search?hl=en&safe=active&q=lil+chuckie+and+lil+twist+girl+i+got+you&aq=0&aqi=g1g-m1&aql=&oq=lil+chuckie+and+lil+twist&gs_rfai=">http://www.google.com/search?hl=en&safe=active&q=lil+chuckie+and+lil+twist+girl+i+got+you&aq=0&aqi=g1g-m1&aql=&oq=lil+chuckie+and+lil+twist&gs_rfai=</a>" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"</blockquote>
</div><div><br></div><div>Конфиг для мемкеша:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
location /actions/getlastdownloads.json {</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
add_header X-Robots-Tag noindex;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
set $memcached_key '_lastdownloads.json';</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
memcached_pass <a href="http://main.savevid.com:11211">main.savevid.com:11211</a>;</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
}</blockquote><div><br></div><div>Для memcachedb похожий.</div><div><br></div><div><br></div><div>Кто-нибудь с таким встречался/боролся? Хотелось бы понять, в каком направлении копать, нгинкса или мемкешеда.</div><div> </div>
</div><div><b>Спасибо</b><br clear="all">Alexandr Vasilenko<br>Web Developer<br><a href="http://www.savevid.com">www.savevid.com</a><br>ICQ:284752117/<a href="mailto:JID%3Amente@jabber.kiev.ua">JID:mente@jabber.kiev.ua</a><br>
Skype:menterr<br>mob: +38097-611-45-99<br>
</div>