nginx rewrites $request_method on error

Yichun Zhang (agentzh) agentzh at gmail.com
Wed May 14 20:16:03 UTC 2014


Hello!

On Tue, May 13, 2014 at 11:52 PM, kay wrote:
> This config produces the same nginx hang.
>
> server {
> listen 80;
> location / {
>         access_by_lua '
>                 local res = ngx.location.capture("/memc?cmd=get&key=test")
>                 return
>         ';
>         root /etc/nginx/www;
> }
> location /memc {
>         internal;
>         access_log /var/log/nginx/memc_log main;
>         log_subrequest on;
>         set $memc_key $arg_key;
>         set $memc_cmd $arg_cmd;
>         memc_cmds_allowed get;
>         memc_pass localhost:11211;
> }
> }

I've tried your nginx config snippet on my side with nginx 1.7.0 +
ngx_memc 0.14 + ngx_lua 0.9.7. And I cannot reproduce any hang on my
side. Without further details I'm afraid I cannot really help.

Several suggestions:

1.  check out your nginx error log for any hints regarding your
configuration issues or memcached backend issues or something.

2. try to construct a minimal but still *complete* example that can
help reproducing the issue you're seeing in others' boxes, preferably
with precise steps.

3. try to enable the nginx debugging logs for more details for your
problematic request: http://nginx.org/en/docs/debugging_log.html If
you do not understand the debugging logs, you can put it somewhere on
the web (like GitHub Gist) and provide the link here.

Regards,
-agentzh



More information about the nginx mailing list