nginx, echo module & lua

agentzh agentzh at
Thu May 3 13:03:45 UTC 2012

On Thu, May 3, 2012 at 6:43 PM, Pierre <serarien at> wrote:
> using echo_subrequest_async, I directly reach :
> 2012/05/03 12:08:25 [error] 13204#0: *1 subrequests cycle while processing "/trucalacon",

Which version of nginx are you using?

> Last interrogation:
> What is the best way to discard body (I mean free the memory by body passed to subrequests ) ?

There's no way to release all the memory of a subrequest instantly
because nginx subrequests share the same memory pool as their parent
request. So for long-running requests that issue a lot of serial
subrequests, there will be a good chance of temporary memory leaks in
the lifetime of the main request.

It's worth mentioning that the ngx_lua cosocket API does not suffer
from this issue because Lua GC handles the resource lifetime there.

Best regards,

More information about the nginx mailing list