srcache + mogilefs module

haad nginx-forum at nginx.us
Sun Apr 22 06:14:43 UTC 2012


agentzh Wrote:
-------------------------------------------------------
> On Sun, Apr 22, 2012 at 5:49 AM, haad
> <nginx-forum at nginx.us> wrote:
> >> Basically, you should rely on ngx_srcache's
> >> srcache_store to store the
> >> responses automatically for you, rather than
> >> inserting values into
> >> memcached yourself.
> >
> > But from attached log or this new [1] dump it
> seems tat srcache_store is
> > never called.
> > I was not aware of this, it should be added to
> documentation :).
> >
> 
> According to your debug log, the ngx_mogilefs
> module left your
> location /share/ and did an internal redirect to
> an
> automatically-generated location named
> /mogstored_spare_34991976/  or
> so (maybe created by the mogilefs_pass directive):
> 
> [debug] 7200#0: *1058 internal redirect:
> "/mogstored_spare_34991976/?"
> 
> And you didn't configure ngx_srcache at all in
> this anonymous location
> and hence no srcache_store love here.

So if I configure location with /mogstored and sets srcache_store there
it should be working ?

location ~ /mogstored_ {
   srcache_store PUT /memc
}

> AFAIK, the ngx_eval module also does something
> similar here (i.e.,
> creating nested locations automatically).

I'm not sure what you mean by this :) are you suggesting that 
I should use it ?

> 
> > [1] https://gist.github.com/2439805
> >
> 
> Just search for "internal redirect" in your debug
> log above.
> 
> Also, you should be careful when using the "if"
> directive in location
> blocks because it also created a nested anonymous
> location. See the
> discussion here:
> 
> http://agentzh.blogspot.com/2011/03/how-nginx-loca
> tion-if-works.html
> 
> Best regards,
> -agentzh
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,225568,225614#msg-225614



More information about the nginx mailing list