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:
http://forum.nginx.org/read.php?2,180128,180128#msg-180128

Hi,

Which techniques do you use to catch memory leak issues?

https://github.com/shrimp/no-pool-nginx

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

Thanks!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,180128,181402#msg-181402

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs