memcached.

drmarker drmarker at gmail.com
Tue Sep 19 18:42:48 MSD 2006


Кстати, мы попробовали mod_cache в apache 2.2.0. Работает out-of-box и
прозрачно для. Если кеширования на уровне страниц хватает - самое оно.

On 9/19/06, Aleksej Novikov <aleksej at novikov.lv> wrote:
> Hello nginx-ru,
>
>   Настроил простую конфигурацию с memcached.  Все файлы по маске описал.
>
> location ~* ^.+\.(mem)$ {
>    default_type    text/html;
>    memcached_pass  127.0.0.1:11111;
>    error_page      404 = /_backend_/$uri&get=1;
> }
>
> location ~ /_backend_/ {
>         internal;
>         rewrite .* /_backend_/index.php?url=$request_uri;
>         fastcgi_pass 127.0.0.1:9000;
>         ...
>         ...
>         fastcgi_param   REMOTE_ADDR     $remote_addr;
>         fastcgi_param   REMOTE_PORT     $remote_port;
> }
>
>
> Сделал простой скриптик на PHP назвал index.php и положил в  /_backend_/
> <?
> ....
> $key = $_GET['url'];
> $data=time();
> $cCache->set($key, $data, false, 15);
> echo "added to memcache..."
> ...
> ?>
>
> При первом обращении на адрес http://localhost/test.mem всё клёво пишется в memcache и
> выводится сообшение.
>
> при втором, nginx удачно выдёргивает данные и выдаёт мне записанное ранее значение. Однако
> после этого броузер не закрывает соединение, бегут часики типо качется что-то и так оно и
> висит последняя запись в error_log .
> 2006/09/19 17:22:21 [debug] 2384#0: *460 copy filter: 0 "/test.mem?"
> 2006/09/19 17:22:21 [debug] 2384#0: *460 event timer add: 44: 180000:3329718378
> 2006/09/19 17:22:21 [debug] 2384#0: *460 event timer: 45, old: 3329598377, new: 3329598378
> 2006/09/19 17:22:21 [debug] 2384#0: *460 http upstream dummy handler
>
> по нажатию стоп дописываются ещё строки.
>
>
> 2006/09/19 17:23:36 [debug] 2384#0: *464 http upstream check client, write event:0, "/test.mem"
> 2006/09/19 17:23:36 [info] 2384#0: *464 client closed prematurely connection, so upstream connection is closed too (104: Connection reset by peer) while sending to client, client: 10.10.10.2, server: newzfind.2000lv.com, URL: "/test.mem", upstream: "memcached://127.0.0.1:11111", host: "newzfind.2000lv.com"
> 2006/09/19 17:23:36 [debug] 2384#0: *464 finalize http upstream request: 499
> 2006/09/19 17:23:36 [debug] 2384#0: *464 finalize http memcached request
> 2006/09/19 17:23:36 [debug] 2384#0: *464 close http upstream connection: 5
> 2006/09/19 17:23:36 [debug] 2384#0: *464 event timer del: 5: 3329668667
> 2006/09/19 17:23:36 [debug] 2384#0: *464 http output filter "/test.mem?"
> 2006/09/19 17:23:36 [debug] 2384#0: *464 copy filter: "/test.mem?"
>
> Полный Debug Log прилагается.
> Nginx version 4.2.
>
>
>
>
> --
> Best regards,
> Aleksej
> ICQ: 113882950
> GSM:371.936.86.24
>
>


More information about the nginx-ru mailing list