Welcome! Log In Create A New Profile

Advanced

Re: srcache + mogilefs module

agentzh
April 21, 2012 12:46AM
On Sat, Apr 21, 2012 at 4:16 AM, haad <nginx-forum@nginx.us> wrote:
> My problem is that it seems that even if I put files to memcache
> manually and it srcache will find it (see log below), my file is still
> served from mogilefs and not from memcached.
>

What does the data you put into memcached look like? The ngx_srcache
module requires the value to be the *whole* response, that is,
including the status line and all those response headers.

Basically, you should rely on ngx_srcache's srcache_store to store the
responses automatically for you, rather than inserting values into
memcached yourself.

> 2012/04/20 21:28:21 [debug] 7385#0: *501 memcached: "VALUE
> /share/file.html 0 10" <---- WE got it

Yes, ngx_srcache got the value from memcached here.

> 2012/04/20 21:28:21 [error] 7385#0: *501 srcache_fetch: cache sent
> invalid status line while sending to client, client: 192.168.200.64,
> server: ws01x.test.reality.sk, request: "GET /share/file.html HTTP/1.0",
> subrequest: "/memc", upstream: "memcached://192.168.206.3:11211", host:
> "192.168.200.64"

But here, ngx_srcache then found the value is invalid in that it does
not have a valid HTTP status line at the beginning, so it immediately
abandoned the cached value, and treated it as a cache miss.

>
> From this log I can see why is file can't serverd from memcached, server
> status 200.

Maybe I should make the debug log more verbose a bit here ;)

> Are srcache and mogilefs module somehow incompatible ?
>

ngx_srcache is designed to be backend independent ;) If it's not, then
there must be a bug somewhere ;)

In your case here, it seems to be the bad format of the data that you
manually inserted into memcached.

Best regards,
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

srcache + mogilefs module

haad April 20, 2012 04:16PM

Re: srcache + mogilefs module

agentzh April 21, 2012 12:46AM

Re: srcache + mogilefs module

haad April 21, 2012 05:49PM

Re: srcache + mogilefs module

agentzh April 21, 2012 11:32PM

Re: srcache + mogilefs module

haad April 22, 2012 02:14AM

Re: srcache + mogilefs module

agentzh April 22, 2012 11:42PM

Re: srcache + mogilefs module

haad April 23, 2012 06:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 256
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready