Recently I write a simple Nginx module ,but when I deploy it on the product environment it will make the Nginx service crash as it takes too many memory.The main handler code is here
http://codepad.org/2H9We02C
I've checked the code from time to time but still cannot solve the problem.And I hope someone offer me some suggestions about it.