0

How do we check there are any memory leaks in a web site?

Are there any tools available for free to check memory leakage in the web portal.

I am using the php and Mysql technologies for the site.

oers
  • 17,419
  • 11
  • 64
  • 73
gmhk
  • 14,439
  • 26
  • 82
  • 107
  • As a general rule, you shouldn't have problems with PHP and memory leakage. None of the processes run long enough to matter. Of course, there are exception to that rule. What exactly is your portal doing? – DampeS8N Dec 28 '10 at 17:49
  • See: http://stackoverflow.com/questions/849549/finding-cause-of-memory-leaks-in-large-php-stacks – webbiedave Dec 28 '10 at 18:00

2 Answers2

0

If it's a script that is using a ton of memory, you can use PHP's memory_get_usage() function to help you debug.

Erik
  • 192
  • 1
  • 11
0

You can make use of the PHP profiling tools such as xdebug. (even come with GUI tools)

This tools provide a way for to trace all the functions calls, create variables ... etc and most importantly the memory usage for each stages/calls and it's accumulated memory used.

Related question : PHP memory profiling

Community
  • 1
  • 1
ajreal
  • 44,929
  • 10
  • 81
  • 118