nginx eval with memc set command very slowly
agentzh
agentzh at gmail.com
Sat Apr 10 18:40:52 MSD 2010
On Fri, Mar 12, 2010 at 11:09 AM, agentzh <agentzh at gmail.com> wrote:
> On Fri, Mar 12, 2010 at 11:05 AM, agentzh <agentzh at gmail.com> wrote:
>> I've reproduced this hang on my side and spent half of my day tracking
>> this issue. But it looked deeper than I had expected.
>>
>
> Forgot to mention that the "post subrequest" handler does not get
> called in this case. It seems ngx_http_upstream does not call
> finalize_request. Most likely an issue in ngx_memc's input filters.
I've fixed this bug in ngx_memc v0.08:
http://wiki.nginx.org/NginxHttpMemcModule#v0.08
ngx_memc didn't support subrequests in memory for memcached commands
other than "get" in earlier versions. Now it's finally fixed by
setting r->upstream->buffer's .pos and .last pointers properly in the
upstream input filters.
Also I've fixed a nasty bug in the discard_bufs function in my fork of
ngx_eval. It used to produce random hanging or segfaults when
eval_subrequest_in_memory was turned off.
Thanks!
-agentzh
More information about the nginx
mailing list