About cleanup of subrequests

Chieu lfchieu at gmail.com
Wed Nov 17 11:11:26 MSK 2010


I have written a nginx module which may produce thousands of
subrequests.Each subrequest may connect to the upstream and fetch
Like map-reduce, my module map the main request to many subrequest and
reduce the datas fetched from upstreams.

So,the problem comes.  Since nginx free the memory when the main
request ends, all my subrequest can't be cleaned up until the main
request finished.
The memory that subrequests occupied will become very large.

Can somebody tell me how can free the memory which subrequests applied
when this subrequest finished?


LF Chieu

More information about the nginx mailing list