How to catch memory leak?

Is there any ways to catch memory leak in nginx? I run valgrind and it
does not catch anything. I wrote module which sends sub-request to
different location, reads response to variable. Then I check this
variable in config file and do, or not do rewrite original url. At the
run nginx eats about 150Mb but after day working on load it grows to
300Mb. I run valgrind on test machine but there were not any errors.
Looks like everything in palloc pool, which is freed after kill. From
code it is not obvious where the leak can take place. Compilation
–debug shows that request memory pool freed after each request.

Which techniques do you use to catch memory leak issues?

Posted at Nginx Forum:

Hi,

Which techniques do you use to catch memory leak issues?

Best regards,
Piotr S. < [email protected] >

Thanks!

Posted at Nginx Forum:

On Fri, Mar 4, 2011 at 5:48 AM, magz [email protected] wrote:

Is there any ways to catch memory leak in nginx? I run valgrind and it
does not catch anything.

When you run nginx with valgrind, please ensure that you set the
following stuffs in your nginx.conf:

worker_processes 1;
daemon off;
master_process off;

Cheers,
-agentzh