ngx_lua location capture issue

agentzh agentzh at
Wed Oct 19 09:24:35 UTC 2011

On Wed, Oct 19, 2011 at 10:33 AM, agentzh <agentzh at> wrote:
> On Wed, Oct 19, 2011 at 12:55 AM, Nginx User <nginx at> wrote:
>>        location /test_loc {
>>                internal;
>>                alias /usr/share/test_loc/;
>>                rewrite_by_lua 'ngx.exec("@proxy");';
> Could you please try using content_by_lua here instead of
> rewrite_by_lua? I want to confirm that it is indeed a bug in
> rewrite_by_lua rather than content_by_lua :)

I think I've already fixed this issue in the ngx_lua v0.3.1rc17 release:

There was a bug in ngx.exec()'s handling when being used within
rewrite_by_lua* and access_by_lua* directives, which could cause
hanging in certain extreme conditions.

Could you please try it out on your side?

Thanks for the report!

P.S. This new version of ngx_lua has also been included in the latest
ngx_openresty devel release here:

More information about the nginx mailing list